From de1652bac9af91585c602e3ac2f32e6e74c62b62 Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Mon, 23 Sep 2019 16:31:06 +0200 Subject: [PATCH] fix(core): update --- test/test.7.taskloop.ts | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/test/test.7.taskloop.ts b/test/test.7.taskloop.ts index 5715636..233fb85 100644 --- a/test/test.7.taskloop.ts +++ b/test/test.7.taskloop.ts @@ -12,12 +12,17 @@ tap.test('should create tasks', async () => { name: 'myPreTask', taskFunction: async () => { console.log('pretask executed :)'); + return 'hi'; } }); afterTask = new taskbuffer.Task({ name: 'myAfterTask', - taskFunction: async () => { + taskFunction: async (x) => { + if (x === 'hi') { + console.log('afterTask: values get passed along alright'); + } console.log('afterTask executed :)'); + return x; }, preTask, afterTask @@ -25,8 +30,12 @@ tap.test('should create tasks', async () => { mainTask = new taskbuffer.Task({ name: 'mainTask', - taskFunction: async () => { - console.log('main task executed'); + taskFunction: async (x) => { + if (x === 'hi') { + console.log('mainTask: values get passed along alright'); + } + console.log('afterTask executed :)'); + return x; }, preTask, afterTask