fix(core): update

This commit is contained in:
2022-02-02 16:55:12 +01:00
parent c3a772c155
commit 0483b55a9e
7 changed files with 1571 additions and 1289 deletions

View File

@ -9,15 +9,15 @@ tap.test('should create valid testTimeStamp instance', async (tools) => {
testTimeStamp = new smarttime.TimeStamp();
await tools.delayFor(2);
testTimeStamp2 = new smarttime.TimeStamp();
expect(testTimeStamp).to.be.instanceof(smarttime.TimeStamp);
expect(testTimeStamp).to.be.instanceof(smarttime.TimeStamp);
expect(testTimeStamp).toBeInstanceOf(smarttime.TimeStamp);
expect(testTimeStamp).toBeInstanceOf(smarttime.TimeStamp);
});
tap.test('should have valid linuxtime', async () => {
// tslint:disable-next-line:no-unused-expression
expect(testTimeStamp.isOlderThan(testTimeStamp2)).to.be.true;
expect(testTimeStamp.isOlderThan(testTimeStamp2)).toBeTrue();
// tslint:disable-next-line:no-unused-expression
expect(testTimeStamp.isYoungerThanOtherTimeStamp(testTimeStamp2)).to.be.false;
expect(testTimeStamp.isYoungerThanOtherTimeStamp(testTimeStamp2)).toBeFalse();
});
let testHrtMeasurement: smarttime.HrtMeasurement;
@ -28,8 +28,8 @@ tap.test('should create valid HrtMeasurements', async (tools) => {
testHrtMeasurement.start();
await tools.delayFor(20);
testHrtMeasurement.stop();
expect(testHrtMeasurement.milliSeconds).to.be.greaterThan(19);
expect(testHrtMeasurement.milliSeconds).to.be.lessThan(25);
expect(testHrtMeasurement.milliSeconds).toBeGreaterThan(19);
expect(testHrtMeasurement.milliSeconds).toBeLessThan(25);
});
// check units

View File

@ -6,7 +6,7 @@ let testCronManager: smarttime.CronManager;
tap.test('should create a valid instance of cronmanager', async () => {
testCronManager = new smarttime.CronManager();
expect(testCronManager).to.be.instanceOf(smarttime.CronManager);
expect(testCronManager).toBeInstanceOf(smarttime.CronManager);
});
tap.test('should create a valid cronJon', async (tools) => {

View File

@ -23,7 +23,7 @@ tap.test('should create a date and time with European Format', async () => {
tap.test('should create a European date string', async () => {
const extendedDate = smarttime.ExtendedDate.fromHyphedDate('2018-02-13');
expect(extendedDate.exportToEuropeanDate()).to.equal('13.02.2018');
expect(extendedDate.exportToEuropeanDate()).toEqual('13.02.2018');
});
tap.test('should format a date', async () => {

View File

@ -7,7 +7,7 @@ let testTimer: Timer;
tap.test('should create a valid timer', async () => {
testTimer = new Timer(1000);
expect(testTimer).to.be.instanceof(Timer);
expect(testTimer).toBeInstanceOf(Timer);
});
tap.test('should start timer', async () => {