mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-24 20:14:37 -04:00
Add scar tests.
This commit is contained in:
parent
1cba9290b6
commit
c4fa90a747
12 changed files with 263 additions and 3 deletions
17
test-scar/util/modjs.js
Normal file
17
test-scar/util/modjs.js
Normal file
|
@ -0,0 +1,17 @@
|
|||
const lodash = window._;
|
||||
const modjs = window.modulejs;
|
||||
|
||||
function clearModulejs() {
|
||||
lodash.each(modjs._private.instances, (val, key) => {
|
||||
delete modjs._private.instances[key]; // eslint-disable-line prefer-reflect
|
||||
});
|
||||
}
|
||||
|
||||
function mockConfigModule() {
|
||||
modjs.define('config', {_dummyConfig: true});
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
clearModulejs,
|
||||
mockConfigModule
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue