Fix TaskQueue constructor when no options passed

This commit is contained in:
Christopher Willis-Ford 2019-02-15 15:20:38 -08:00
parent be040f4c9b
commit e6dd3f1175
2 changed files with 10 additions and 1 deletions

View file

@ -36,6 +36,15 @@ test('spec', t => {
t.end();
});
test('constructor', t => {
t.ok(new TaskQueue(1, 1));
t.ok(new TaskQueue(1, 1, {}));
t.ok(new TaskQueue(1, 1, {startingTokens: 0}));
t.ok(new TaskQueue(1, 1, {maxTotalCost: 999}));
t.ok(new TaskQueue(1, 1, {startingTokens: 0, maxTotalCost: 999}));
t.end();
});
test('run tasks', async t => {
const bukkit = makeTestQueue();