Skip to content

Commit

Permalink
Update desktop-feature-api-testing.mdx (#635)
Browse files Browse the repository at this point in the history
Replace `ChromeUtils.import` with `ChromeUtils.importESM` so that examples work again.
  • Loading branch information
moztcampbell authored Nov 5, 2024
1 parent 99fe381 commit df0d696
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/workflow/testing/desktop-feature-api-testing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import TabItem from "@theme/TabItem";
In order to make testing easier we created some helpers that can be accessed by including

```js
const { ExperimentFakes } = ChromeUtils.import(
const { ExperimentFakes } = ChromeUtils.importESModule(
"resource://testing-common/NimbusTestUtils.sys.mjs",
);
```
Expand Down Expand Up @@ -60,10 +60,10 @@ For experiments that are in "preview" mode:
For writing tests you usually want to have the following modules imported:

```js
const { ExperimentAPI, NimbusFeatures } = ChromeUtils.import(
const { ExperimentAPI, NimbusFeatures } = ChromeUtils.importESModule(
"resource://nimbus/ExperimentAPI.sys.mjs",
);
const { ExperimentFakes } = ChromeUtils.import(
const { ExperimentFakes } = ChromeUtils.importESModule(
"resource://testing-common/NimbusTestUtils.sys.mjs",
);
```
Expand Down

0 comments on commit df0d696

Please sign in to comment.