fix(core): update

This commit is contained in:
2021-10-06 11:58:36 +02:00
parent 419fe80bde
commit 76768a1307
11 changed files with 14636 additions and 34 deletions

View File

@ -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++;

View File

@ -2,6 +2,11 @@ import { expect, tap } from '@pushrocks/tapbundle';
import * as smarttime from '../ts/index';
tap.test('should create a valid JavaScript Date', async () => {
const extendedDate = new smarttime.ExtendedDate(Date.now());
console.log(extendedDate);
});
tap.test('should create a valid JavaScript Date from European TimeStamp', async () => {
const extendedDate = smarttime.ExtendedDate.fromEuropeanDate('1.6.2018');
console.log(extendedDate);