fix(core): update

This commit is contained in:
Philipp Kunz 2022-01-21 17:37:30 +01:00
parent 998827f1bf
commit 6f5ceacad2
5 changed files with 21 additions and 5 deletions

7
package-lock.json generated
View File

@ -11,7 +11,8 @@
"dependencies": {
"@pushrocks/smartdelay": "^2.0.13",
"@pushrocks/smartpromise": "^3.1.6",
"chai": "^4.3.4"
"chai": "^4.3.4",
"fast-deep-equal": "^3.1.3"
},
"devDependencies": {
"@gitzone/tsbuild": "^2.1.25",
@ -7054,7 +7055,6 @@
"version": "3.1.3",
"resolved": "https://verdaccio.lossless.one/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
"dev": true,
"license": "MIT"
},
"node_modules/fast-glob": {
@ -21011,8 +21011,7 @@
"fast-deep-equal": {
"version": "3.1.3",
"resolved": "https://verdaccio.lossless.one/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
"dev": true
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="
},
"fast-glob": {
"version": "2.2.7",

View File

@ -23,7 +23,8 @@
"dependencies": {
"@pushrocks/smartdelay": "^2.0.13",
"@pushrocks/smartpromise": "^3.1.6",
"chai": "^4.3.4"
"chai": "^4.3.4",
"fast-deep-equal": "^3.1.3"
},
"browserslist": [
"last 1 chrome versions"

View File

@ -17,4 +17,9 @@ tap.test('async tests', async (toolsArg) => {
await smartexpect.expectAsync(deferred.promise).not.toBeTypeofBoolean();
});
tap.test('should check equality', async () => {
smartexpect.expect('hithere').toEqual('hithere');
smartexpect.expect('hithere').not.toEqual('hithere2');
})
tap.start();

View File

@ -91,4 +91,13 @@ export class Assertion {
}
});
}
public toEqual(comparisonObject: any) {
return this.runCheck(() => {
const result = plugins.fastDeepEqual(this.baseReference, comparisonObject);
if (!result) {
throw new Error(`${this.baseReference} does not equal ${comparisonObject}`);
}
});
}
}

View File

@ -8,7 +8,9 @@ export {
// third party scope
import { expect } from 'chai';
import fastDeepEqual from 'fast-deep-equal';
export {
fastDeepEqual,
expect
}