Clean test code.

This commit is contained in:
Lars Jung 2015-04-28 00:25:48 +02:00
parent c8bffa006b
commit cb5c197994
3 changed files with 6 additions and 8 deletions

View file

@ -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._);

View file

@ -1,2 +0,0 @@
window.util = window.util || {};
window.util.GLOBAL = this;

View file

@ -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 || {};