fix(core): update
This commit is contained in:
parent
5310bef1be
commit
de1652bac9
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user