diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
commit | 36d22d82aa202bb199967e9512281e9a53db42c9 (patch) | |
tree | 105e8c98ddea1c1e4784a60a5a6410fa416be2de /devtools/client/webconsole/test/node/jest-setup.js | |
parent | Initial commit. (diff) | |
download | firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip |
Adding upstream version 115.7.0esr.upstream/115.7.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'devtools/client/webconsole/test/node/jest-setup.js')
-rw-r--r-- | devtools/client/webconsole/test/node/jest-setup.js | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/devtools/client/webconsole/test/node/jest-setup.js b/devtools/client/webconsole/test/node/jest-setup.js new file mode 100644 index 0000000000..a7f26960c1 --- /dev/null +++ b/devtools/client/webconsole/test/node/jest-setup.js @@ -0,0 +1,54 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */ + +"use strict"; + +/* global global, __dirname */ + +const { + setMocksInGlobal, +} = require("resource://devtools/client/shared/test-helpers/shared-node-helpers.js"); +setMocksInGlobal(); + +// Configure enzyme with React 16 adapter. +const Enzyme = require("enzyme"); +const Adapter = require("enzyme-adapter-react-16"); +Enzyme.configure({ adapter: new Adapter() }); + +global.Components = { stack: { caller: "" }, Constructor: () => {} }; + +if (!global.ResizeObserver) { + global.ResizeObserver = class ResizeObserver { + observe() {} + unobserve() {} + disconnect() {} + }; +} + +const mcRoot = `${__dirname}/../../../../../`; +const { pref } = require(mcRoot + + "devtools/client/shared/test-helpers/jest-fixtures/Services"); +pref("devtools.debugger.remote-timeout", 10000); +pref("devtools.hud.loglimit", 10000); +pref("devtools.webconsole.filter.error", true); +pref("devtools.webconsole.filter.warn", true); +pref("devtools.webconsole.filter.info", true); +pref("devtools.webconsole.filter.log", true); +pref("devtools.webconsole.filter.debug", true); +pref("devtools.webconsole.filter.css", false); +pref("devtools.webconsole.filter.net", false); +pref("devtools.webconsole.filter.netxhr", false); +pref("devtools.webconsole.inputHistoryCount", 300); +pref("devtools.webconsole.persistlog", false); +pref("devtools.webconsole.timestampMessages", false); +pref("devtools.webconsole.sidebarToggle", true); +pref("devtools.webconsole.groupWarningMessages", false); +pref("devtools.webconsole.input.editor", false); +pref("devtools.webconsole.input.autocomplete", true); +pref("devtools.webconsole.input.eagerEvaluation", true); +pref("devtools.browserconsole.enableNetworkMonitoring", false); +pref("devtools.webconsole.input.editorWidth", 800); +pref("devtools.webconsole.input.editorOnboarding", true); +pref("devtools.webconsole.input.context", false); +pref("devtools.discovery.log", false); |