fix(core): update
This commit is contained in:
parent
c3a772c155
commit
0483b55a9e
2825
package-lock.json
generated
2825
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
12
package.json
12
package.json
@ -12,20 +12,20 @@
|
||||
"build": "(tsbuild --web && tsbundle npm)"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@gitzone/tsbuild": "^2.1.28",
|
||||
"@gitzone/tsbundle": "^1.0.88",
|
||||
"@gitzone/tsbuild": "^2.1.29",
|
||||
"@gitzone/tsbundle": "^1.0.89",
|
||||
"@gitzone/tsrun": "^1.2.18",
|
||||
"@gitzone/tstest": "^1.0.60",
|
||||
"@pushrocks/tapbundle": "^3.2.14",
|
||||
"@types/node": "^16.11.6",
|
||||
"@pushrocks/tapbundle": "^4.0.3",
|
||||
"@types/node": "^17.0.14",
|
||||
"tslint": "^6.1.3",
|
||||
"tslint-config-prettier": "^1.18.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@pushrocks/lik": "^5.0.0",
|
||||
"@pushrocks/lik": "^5.0.4",
|
||||
"@pushrocks/smartdelay": "^2.0.13",
|
||||
"@pushrocks/smartpromise": "^3.1.6",
|
||||
"croner": "^4.0.69",
|
||||
"croner": "^4.0.86",
|
||||
"dayjs": "^1.10.7",
|
||||
"is-nan": "^1.3.2",
|
||||
"pretty-ms": "^7.0.1"
|
||||
|
@ -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
|
||||
|
@ -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) => {
|
||||
|
@ -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 () => {
|
||||
|
@ -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 () => {
|
||||
|
@ -83,6 +83,11 @@ export class ExtendedDate extends Date {
|
||||
return `${units.dayString}.${units.monthString}.${units.yearString}`;
|
||||
}
|
||||
|
||||
public exportToHyphedSortableDate() {
|
||||
const units = this.exportToUnits();
|
||||
return `${units.yearString}-${units.monthString}.${units.dayString}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* exports units
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user