fix(core): update
This commit is contained in:
@@ -17,7 +17,7 @@ tap.test('should create a valid cronJon', async (tools) => {
|
||||
let counter2 = 0;
|
||||
let counter3 = 0;
|
||||
const cronJob = testCronManager.addCronjob('*/2 * * * * *', async () => {
|
||||
if (counter === 10) {
|
||||
if (counter === 5) {
|
||||
testCronManager.removeCronjob(cronJob);
|
||||
done.resolve();
|
||||
}
|
||||
@@ -25,7 +25,7 @@ tap.test('should create a valid cronJon', async (tools) => {
|
||||
console.log(`${new Date().getSeconds()} hey ${counter} -> runs every 2 seconds`);
|
||||
});
|
||||
const cronJob2 = testCronManager.addCronjob('*/3 * * * * *', async () => {
|
||||
if (counter2 === 10) {
|
||||
if (counter2 === 5) {
|
||||
testCronManager.removeCronjob(cronJob2);
|
||||
done2.resolve();
|
||||
}
|
||||
@@ -33,7 +33,7 @@ tap.test('should create a valid cronJon', async (tools) => {
|
||||
console.log(`${new Date().getSeconds()} hey ${counter2} -> runs every 3 seconds`);
|
||||
});
|
||||
const cronJob3 = testCronManager.addCronjob('*/4 * * * * *', async () => {
|
||||
if (counter3 === 10) {
|
||||
if (counter3 === 5) {
|
||||
done3.resolve();
|
||||
}
|
||||
counter3++;
|
||||
|
||||
Reference in New Issue
Block a user