From df0d696e3a3f4d5b75161e16822e8486e53d46bc Mon Sep 17 00:00:00 2001 From: Ted Campbell <53823885+moztcampbell@users.noreply.github.com> Date: Tue, 5 Nov 2024 18:00:28 -0500 Subject: [PATCH] Update desktop-feature-api-testing.mdx (#635) Replace `ChromeUtils.import` with `ChromeUtils.importESM` so that examples work again. --- docs/workflow/testing/desktop-feature-api-testing.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/workflow/testing/desktop-feature-api-testing.mdx b/docs/workflow/testing/desktop-feature-api-testing.mdx index 24f6a9f46..bdf0b6fa8 100644 --- a/docs/workflow/testing/desktop-feature-api-testing.mdx +++ b/docs/workflow/testing/desktop-feature-api-testing.mdx @@ -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", ); ``` @@ -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", ); ```