mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-08-09 07:16:40 +02:00
Add tests.
This commit is contained in:
@@ -193,6 +193,14 @@ describe('module \'' + ID + '\'', function () {
|
|||||||
var instance = this.applyFn();
|
var instance = this.applyFn();
|
||||||
assert.isTrue(_.isFunction(instance.changeItems));
|
assert.isTrue(_.isFunction(instance.changeItems));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('publishes view.changed', function () {
|
||||||
|
|
||||||
|
var instance = this.applyFn();
|
||||||
|
instance.setItems();
|
||||||
|
assert.isTrue(this.xEvent.pub.calledOnce);
|
||||||
|
assert.strictEqual(this.xEvent.pub.lastCall.args[0], 'view.changed');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('.setLocation()', function () {
|
describe('.setLocation()', function () {
|
||||||
@@ -202,6 +210,14 @@ describe('module \'' + ID + '\'', function () {
|
|||||||
var instance = this.applyFn();
|
var instance = this.applyFn();
|
||||||
assert.isTrue(_.isFunction(instance.setLocation));
|
assert.isTrue(_.isFunction(instance.setLocation));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('publishes view.changed', function () {
|
||||||
|
|
||||||
|
var instance = this.applyFn();
|
||||||
|
instance.setItems();
|
||||||
|
assert.isTrue(this.xEvent.pub.calledOnce);
|
||||||
|
assert.strictEqual(this.xEvent.pub.lastCall.args[0], 'view.changed');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('.setHint()', function () {
|
describe('.setHint()', function () {
|
||||||
|
Reference in New Issue
Block a user