Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
2d2788d1ca | |||
de1652bac9 | |||
5310bef1be |
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@pushrocks/taskbuffer",
|
||||
"version": "2.0.12",
|
||||
"version": "2.0.14",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@pushrocks/taskbuffer",
|
||||
"version": "2.0.12",
|
||||
"version": "2.0.14",
|
||||
"private": false,
|
||||
"description": "flexible task management. TypeScript ready!",
|
||||
"main": "dist/index.js",
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user