mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-25 02:40:22 -10:00
Depends on D49707 Following the naming convention decided in RFC Bug 1564431 Differential Revision: https://phabricator.services.mozilla.com/D49708
30 lines
833 B
JavaScript
30 lines
833 B
JavaScript
/* 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 */
|
|
|
|
// Configure enzyme with React 16 adapter.
|
|
const Enzyme = require("enzyme");
|
|
const Adapter = require("enzyme-adapter-react-16");
|
|
Enzyme.configure({ adapter: new Adapter() });
|
|
|
|
global.loader = {
|
|
lazyGetter: (context, name, fn) => {
|
|
const module = fn();
|
|
global[name] = module;
|
|
},
|
|
lazyRequireGetter: (context, name, module, destructure) => {
|
|
const value = destructure ? require(module)[name] : require(module || name);
|
|
global[name] = value;
|
|
},
|
|
};
|
|
|
|
global.define = function(fn) {
|
|
fn(null, global, { exports: global });
|
|
};
|
|
|
|
global.requestIdleCallback = function() {};
|