Files
h5ai/test/tests/unit/modulejs.js

37 lines
1.0 KiB
JavaScript
Raw Normal View History

2015-04-22 17:12:45 +02:00
(function () {
2015-11-18 23:16:58 +01:00
describe('modulejs', function () {
it('is global object', function () {
assert.isPlainObject(modulejs);
assert.strictEqual(modulejs, window.modulejs);
});
2015-04-22 17:12:45 +02:00
2015-11-18 23:16:58 +01:00
it('.define() is function', function () {
assert.isFunction(modulejs.define);
});
2015-04-22 17:12:45 +02:00
2015-11-18 23:16:58 +01:00
it('.require() is function', function () {
assert.isFunction(modulejs.require);
});
2015-04-22 17:12:45 +02:00
2015-11-18 23:16:58 +01:00
it('.state() is function', function () {
assert.isFunction(modulejs.state);
});
2015-04-22 17:12:45 +02:00
2015-11-18 23:16:58 +01:00
it('.log() is function', function () {
assert.isFunction(modulejs.log);
});
2015-04-22 17:12:45 +02:00
2015-11-18 23:16:58 +01:00
it('._private is object', function () {
assert.isObject(modulejs._private);
});
2015-04-22 17:12:45 +02:00
2015-11-18 23:16:58 +01:00
it('has definitions', function () {
assert.isAbove(_.keys(modulejs._private.definitions).length, 0);
});
2015-04-22 17:12:45 +02:00
2015-11-18 23:16:58 +01:00
it('has no instances', function () {
assert.lengthOfKeys(modulejs._private.instances, 0);
});
2015-04-22 17:12:45 +02:00
});
}());