summaryrefslogtreecommitdiffstats
path: root/tools/lint/eslint/eslint-plugin-mozilla/tests/reject-multiple-getters-calls.js
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tools/lint/eslint/eslint-plugin-mozilla/tests/reject-multiple-getters-calls.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/lint/eslint/eslint-plugin-mozilla/tests/reject-multiple-getters-calls.js b/tools/lint/eslint/eslint-plugin-mozilla/tests/reject-multiple-getters-calls.js
index a2b88a8652..d9450ad24e 100644
--- a/tools/lint/eslint/eslint-plugin-mozilla/tests/reject-multiple-getters-calls.js
+++ b/tools/lint/eslint/eslint-plugin-mozilla/tests/reject-multiple-getters-calls.js
@@ -46,6 +46,14 @@ ruleTester.run("reject-multiple-getters-calls", rule, {
});
}
`,
+ `
+ ChromeUtils.defineESModuleGetters(lazy, {
+ AppConstants: "resource://gre/modules/AppConstants.sys.mjs",
+ }, { global: "current" });
+ ChromeUtils.defineESModuleGetters(lazy, {
+ PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
+ }, { global: "shared" });
+ `,
],
invalid: [
invalidCode(`
@@ -56,5 +64,13 @@ ruleTester.run("reject-multiple-getters-calls", rule, {
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
});
`),
+ invalidCode(`
+ ChromeUtils.defineESModuleGetters(lazy, {
+ AppConstants: "resource://gre/modules/AppConstants.sys.mjs",
+ }, { global: "current" });
+ ChromeUtils.defineESModuleGetters(lazy, {
+ PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
+ }, { global: "current" });
+ `),
],
});