summaryrefslogtreecommitdiffstats
path: root/devtools/client/shared/test-helpers/jest-fixtures/ChromeUtils.js
diff options
context:
space:
mode:
Diffstat (limited to 'devtools/client/shared/test-helpers/jest-fixtures/ChromeUtils.js')
-rw-r--r--devtools/client/shared/test-helpers/jest-fixtures/ChromeUtils.js14
1 files changed, 13 insertions, 1 deletions
diff --git a/devtools/client/shared/test-helpers/jest-fixtures/ChromeUtils.js b/devtools/client/shared/test-helpers/jest-fixtures/ChromeUtils.js
index 2fee8bc01c..d396777223 100644
--- a/devtools/client/shared/test-helpers/jest-fixtures/ChromeUtils.js
+++ b/devtools/client/shared/test-helpers/jest-fixtures/ChromeUtils.js
@@ -4,9 +4,21 @@
"use strict";
+const mockedESM = {
+ BinarySearch: {
+ insertionIndexOf() {
+ return 0;
+ },
+ },
+};
+
module.exports = {
import: () => ({}),
addProfilerMarker: () => {},
- defineESModuleGetters: () => {},
+ defineESModuleGetters: (lazy, dict) => {
+ for (const key in dict) {
+ lazy[key] = mockedESM[key];
+ }
+ },
importESModule: () => ({}),
};