fix(core): update

This commit is contained in:
2019-09-05 11:35:26 +02:00
parent 4c7a373d98
commit eff9c6e6c9
7 changed files with 507 additions and 424 deletions

View File

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