summaryrefslogtreecommitdiffstats
path: root/browser/components/pocket/test/unit/panels/head.js
blob: cc6ba440f186672b096ef19e0a11fb91d7d8549d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
const { sinon } = ChromeUtils.importESModule(
  "resource://testing-common/Sinon.sys.mjs"
);

const testGlobal = {
  PKT_PANEL_OVERLAY: class {
    create() {}
  },
  RPMRemoveMessageListener: () => {},
  RPMAddMessageListener: () => {},
  RPMSendAsyncMessage: () => {},
  window: {},
  self: {},
};

Services.scriptloader.loadSubScript(
  "chrome://pocket/content/panels/js/vendor.bundle.js",
  testGlobal
);

Services.scriptloader.loadSubScript(
  "chrome://pocket/content/panels/js/main.bundle.js",
  testGlobal
);