Clean test code.
This commit is contained in:
parent
c8bffa006b
commit
cb5c197994
3 changed files with 6 additions and 8 deletions
|
@ -3,13 +3,13 @@
|
|||
|
||||
describe('premisses', function () {
|
||||
|
||||
it('window is the global object', function () {
|
||||
it('window is global object', function () {
|
||||
|
||||
assert.isObject(window);
|
||||
assert.strictEqual(window, util.GLOBAL);
|
||||
assert.strictEqual(window, window.window);
|
||||
});
|
||||
|
||||
it('jQuery is defined', function () {
|
||||
it('jQuery and $ are global objects', function () {
|
||||
|
||||
assert.isFunction(jQuery);
|
||||
assert.strictEqual(jQuery, window.jQuery);
|
||||
|
@ -19,7 +19,7 @@ describe('premisses', function () {
|
|||
assert.strictEqual($, window.$);
|
||||
});
|
||||
|
||||
it('lodash is defined', function () {
|
||||
it('_ is global object', function () {
|
||||
|
||||
assert.isFunction(_);
|
||||
assert.strictEqual(_, window._);
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
window.util = window.util || {};
|
||||
window.util.GLOBAL = this;
|
|
@ -4,14 +4,14 @@
|
|||
function clearModulejs() {
|
||||
|
||||
_.each(modulejs._private.instances, function (val, key) {
|
||||
|
||||
delete modulejs._private.instances[key];
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function mockConfigModule() {
|
||||
|
||||
modulejs.define('config', util.uniqObj());
|
||||
modulejs.define('config', window.util.uniqObj());
|
||||
}
|
||||
|
||||
window.util = window.util || {};
|
||||
|
|
Loading…
Add table
Reference in a new issue