Compare commits

...

3 Commits

Author SHA1 Message Date
2d2788d1ca 2.0.14 2019-09-23 16:31:07 +02:00
de1652bac9 fix(core): update 2019-09-23 16:31:06 +02:00
5310bef1be 2.0.13 2019-09-22 15:18:28 +02:00
3 changed files with 14 additions and 5 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "@pushrocks/taskbuffer", "name": "@pushrocks/taskbuffer",
"version": "2.0.12", "version": "2.0.14",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View File

@ -1,6 +1,6 @@
{ {
"name": "@pushrocks/taskbuffer", "name": "@pushrocks/taskbuffer",
"version": "2.0.12", "version": "2.0.14",
"private": false, "private": false,
"description": "flexible task management. TypeScript ready!", "description": "flexible task management. TypeScript ready!",
"main": "dist/index.js", "main": "dist/index.js",

View File

@ -12,12 +12,17 @@ tap.test('should create tasks', async () => {
name: 'myPreTask', name: 'myPreTask',
taskFunction: async () => { taskFunction: async () => {
console.log('pretask executed :)'); console.log('pretask executed :)');
return 'hi';
} }
}); });
afterTask = new taskbuffer.Task({ afterTask = new taskbuffer.Task({
name: 'myAfterTask', name: 'myAfterTask',
taskFunction: async () => { taskFunction: async (x) => {
if (x === 'hi') {
console.log('afterTask: values get passed along alright');
}
console.log('afterTask executed :)'); console.log('afterTask executed :)');
return x;
}, },
preTask, preTask,
afterTask afterTask
@ -25,8 +30,12 @@ tap.test('should create tasks', async () => {
mainTask = new taskbuffer.Task({ mainTask = new taskbuffer.Task({
name: 'mainTask', name: 'mainTask',
taskFunction: async () => { taskFunction: async (x) => {
console.log('main task executed'); if (x === 'hi') {
console.log('mainTask: values get passed along alright');
}
console.log('afterTask executed :)');
return x;
}, },
preTask, preTask,
afterTask afterTask