mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-24 20:14:37 -04:00
Fix a lot eslint errors.
This commit is contained in:
parent
0c6143704a
commit
39ea94daa8
88 changed files with 3872 additions and 4930 deletions
|
@ -1,64 +1,49 @@
|
|||
(function () {
|
||||
'use strict';
|
||||
var ID = 'core/langs';
|
||||
var DEPS = ['_', 'config'];
|
||||
|
||||
var ID = 'core/langs';
|
||||
var DEPS = ['_', 'config'];
|
||||
describe('module \'' + ID + '\'', function () {
|
||||
before(function () {
|
||||
this.definition = modulejs._private.definitions[ID];
|
||||
|
||||
describe('module \'' + ID + '\'', function () {
|
||||
|
||||
before(function () {
|
||||
|
||||
this.definition = modulejs._private.definitions[ID];
|
||||
|
||||
this.xConfig = {langs: uniq.obj()};
|
||||
this.applyFn = function () {
|
||||
|
||||
return this.definition.fn(_, this.xConfig);
|
||||
};
|
||||
});
|
||||
|
||||
describe('definition', function () {
|
||||
|
||||
it('is defined', function () {
|
||||
|
||||
assert.isPlainObject(this.definition);
|
||||
this.xConfig = {langs: uniq.obj()};
|
||||
this.applyFn = function () {
|
||||
return this.definition.fn(_, this.xConfig);
|
||||
};
|
||||
});
|
||||
|
||||
it('has correct id', function () {
|
||||
describe('definition', function () {
|
||||
it('is defined', function () {
|
||||
assert.isPlainObject(this.definition);
|
||||
});
|
||||
|
||||
assert.strictEqual(this.definition.id, ID);
|
||||
it('has correct id', function () {
|
||||
assert.strictEqual(this.definition.id, ID);
|
||||
});
|
||||
|
||||
it('requires correct', function () {
|
||||
assert.deepEqual(this.definition.deps, DEPS);
|
||||
});
|
||||
|
||||
it('args for each request', function () {
|
||||
assert.strictEqual(this.definition.deps.length, this.definition.fn.length);
|
||||
});
|
||||
|
||||
it('has no instance', function () {
|
||||
assert.notProperty(modulejs._private.instances, ID);
|
||||
});
|
||||
|
||||
it('inits without errors', function () {
|
||||
this.applyFn();
|
||||
});
|
||||
});
|
||||
|
||||
it('requires correct', function () {
|
||||
|
||||
assert.deepEqual(this.definition.deps, DEPS);
|
||||
});
|
||||
|
||||
it('args for each request', function () {
|
||||
|
||||
assert.strictEqual(this.definition.deps.length, this.definition.fn.length);
|
||||
});
|
||||
|
||||
it('has no instance', function () {
|
||||
|
||||
assert.notProperty(modulejs._private.instances, ID);
|
||||
});
|
||||
|
||||
it('inits without errors', function () {
|
||||
|
||||
this.applyFn();
|
||||
describe('application', function () {
|
||||
it('returns plain object with right content', function () {
|
||||
var instance = this.applyFn();
|
||||
assert.isPlainObject(instance);
|
||||
assert.deepEqual(instance, this.xConfig.langs);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('application', function () {
|
||||
|
||||
it('returns plain object with right content', function () {
|
||||
|
||||
var instance = this.applyFn();
|
||||
assert.isPlainObject(instance);
|
||||
assert.deepEqual(instance, this.xConfig.langs);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
}());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue