Add scar tests.

This commit is contained in:
Lars Jung 2016-06-01 02:15:04 +02:00
parent 1cba9290b6
commit c4fa90a747
12 changed files with 263 additions and 3 deletions

17
test-scar/util/modjs.js Normal file
View 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
};