fix(tests): now using tstest

This commit is contained in:
2018-08-04 17:53:22 +02:00
parent df18aba4b5
commit f60deddadd
37 changed files with 1607 additions and 1659 deletions

View File

@@ -1,38 +1,38 @@
import { expect, tap } from 'tapbundle'
import taskbuffer = require('../dist/index')
import { expect, tap } from '@pushrocks/tapbundle';
import taskbuffer = require('../ts/index');
import * as smartq from 'smartq'
import * as smartdelay from 'smartdelay'
import * as smartq from 'smartq';
import * as smartdelay from '@pushrocks/smartdelay';
let task1Executed = false
let task1Executed = false;
let task1 = new taskbuffer.Task({
taskFunction: async () => {
await smartdelay.delayFor(2000)
task1Executed = true
await smartdelay.delayFor(2000);
task1Executed = true;
}
})
});
let task2Executed = false
let task2Executed = false;
let task2 = new taskbuffer.Task({
taskFunction: async () => {
await smartdelay.delayFor(2000)
task2Executed = true
await smartdelay.delayFor(2000);
task2Executed = true;
}
})
});
let task3Executed = false
let task3Executed = false;
let task3 = new taskbuffer.Task({
taskFunction: async () => {
await smartdelay.delayFor(2000)
task3Executed = true
await smartdelay.delayFor(2000);
task3Executed = true;
}
})
});
tap.test('expect run in Parallel', async () => {
let testTaskparallel = new taskbuffer.Taskparallel({
taskArray: [ task1, task2, task3 ]
})
await testTaskparallel.trigger()
})
taskArray: [task1, task2, task3]
});
await testTaskparallel.trigger();
});
tap.start()
tap.start();