fix(core): update
This commit is contained in:
@ -18,8 +18,10 @@ tap.test('should run the task as expected', async () => {
|
||||
myTaskManager.addTask(
|
||||
new taskbuffer.Task({
|
||||
name: 'myTask',
|
||||
bufferMax: 1,
|
||||
buffered: true,
|
||||
taskFunction: async () => {
|
||||
console.log('Task executed!');
|
||||
console.log('Task "myTask" executed!');
|
||||
referenceBoolean = true;
|
||||
taskRunCounter++;
|
||||
if (taskRunCounter === 10) {
|
||||
@ -35,7 +37,7 @@ tap.test('should run the task as expected', async () => {
|
||||
});
|
||||
|
||||
tap.test('should schedule task', async () => {
|
||||
myTaskManager.scheduleTaskByName('myTask', '* * * * * *');
|
||||
myTaskManager.scheduleTaskByName('myTask', '*/10 * * * * *');
|
||||
await taskDone.promise;
|
||||
myTaskManager.descheduleTaskByName('myTask');
|
||||
});
|
||||
|
Reference in New Issue
Block a user