Add Hogfather.Create() factory.
This commit is contained in:
@@ -947,7 +947,7 @@ QUnit.asyncTest('sendMessage admin ACL', function(assert) {
|
||||
|
||||
QUnit.module('Hogfather');
|
||||
|
||||
QUnit.asyncTest('Construct/shutdown', function(assert) {
|
||||
QUnit.test('Construct/shutdown', function(assert) {
|
||||
assert.expect(4);
|
||||
|
||||
var cosmo = new Cosmopolite(null, randstring());
|
||||
@@ -956,7 +956,24 @@ QUnit.asyncTest('Construct/shutdown', function(assert) {
|
||||
var hogfather = new Hogfather(cosmo, randstring());
|
||||
assert.ok(true, 'new Hogfather()) succeeds');
|
||||
|
||||
window.setTimeout(function() {
|
||||
hogfather.shutdown();
|
||||
assert.ok(true, 'Hogfather.shutdown() succeeds');
|
||||
|
||||
cosmo.shutdown();
|
||||
assert.ok(true, 'Cosmopolite.shutdown() succeeds');
|
||||
});
|
||||
|
||||
QUnit.asyncTest('Create', function(assert) {
|
||||
assert.expect(5);
|
||||
|
||||
var cosmo = new Cosmopolite(null, randstring());
|
||||
assert.ok(true, 'new Cosmopolite() succeeds');
|
||||
|
||||
Hogfather.Create(cosmo).then(function(hogfather) {
|
||||
assert.ok(true, 'Hogfather.Create() succeeds');
|
||||
|
||||
assert.ok(hogfather, 'Hogfather.Create() returns something');
|
||||
|
||||
hogfather.shutdown();
|
||||
assert.ok(true, 'Hogfather.shutdown() succeeds');
|
||||
|
||||
@@ -964,6 +981,5 @@ QUnit.asyncTest('Construct/shutdown', function(assert) {
|
||||
assert.ok(true, 'Cosmopolite.shutdown() succeeds');
|
||||
|
||||
QUnit.start();
|
||||
}, 10 * 1000);
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user