mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-09-26 04:29:05 +02:00
Refactor test runner
This commit is contained in:
21
test/util/modulejs.js
Normal file
21
test/util/modulejs.js
Normal file
@@ -0,0 +1,21 @@
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
function clearModulejs() {
|
||||
|
||||
_.each(modulejs._private.instances, function (val, key) {
|
||||
delete modulejs._private.instances[key];
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function mockConfigModule() {
|
||||
|
||||
modulejs.define('config', util.uniqObj());
|
||||
}
|
||||
|
||||
window.util = window.util || {};
|
||||
window.util.clearModulejs = clearModulejs;
|
||||
window.util.mockConfigModule = mockConfigModule;
|
||||
|
||||
}());
|
Reference in New Issue
Block a user