fix(core): update
This commit is contained in:
parent
998827f1bf
commit
6f5ceacad2
7
package-lock.json
generated
7
package-lock.json
generated
@ -11,7 +11,8 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@pushrocks/smartdelay": "^2.0.13",
|
"@pushrocks/smartdelay": "^2.0.13",
|
||||||
"@pushrocks/smartpromise": "^3.1.6",
|
"@pushrocks/smartpromise": "^3.1.6",
|
||||||
"chai": "^4.3.4"
|
"chai": "^4.3.4",
|
||||||
|
"fast-deep-equal": "^3.1.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@gitzone/tsbuild": "^2.1.25",
|
"@gitzone/tsbuild": "^2.1.25",
|
||||||
@ -7054,7 +7055,6 @@
|
|||||||
"version": "3.1.3",
|
"version": "3.1.3",
|
||||||
"resolved": "https://verdaccio.lossless.one/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
|
"resolved": "https://verdaccio.lossless.one/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
|
||||||
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
|
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
|
||||||
"dev": true,
|
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/fast-glob": {
|
"node_modules/fast-glob": {
|
||||||
@ -21011,8 +21011,7 @@
|
|||||||
"fast-deep-equal": {
|
"fast-deep-equal": {
|
||||||
"version": "3.1.3",
|
"version": "3.1.3",
|
||||||
"resolved": "https://verdaccio.lossless.one/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
|
"resolved": "https://verdaccio.lossless.one/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
|
||||||
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
|
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"fast-glob": {
|
"fast-glob": {
|
||||||
"version": "2.2.7",
|
"version": "2.2.7",
|
||||||
|
@ -23,7 +23,8 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@pushrocks/smartdelay": "^2.0.13",
|
"@pushrocks/smartdelay": "^2.0.13",
|
||||||
"@pushrocks/smartpromise": "^3.1.6",
|
"@pushrocks/smartpromise": "^3.1.6",
|
||||||
"chai": "^4.3.4"
|
"chai": "^4.3.4",
|
||||||
|
"fast-deep-equal": "^3.1.3"
|
||||||
},
|
},
|
||||||
"browserslist": [
|
"browserslist": [
|
||||||
"last 1 chrome versions"
|
"last 1 chrome versions"
|
||||||
|
@ -17,4 +17,9 @@ tap.test('async tests', async (toolsArg) => {
|
|||||||
await smartexpect.expectAsync(deferred.promise).not.toBeTypeofBoolean();
|
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();
|
tap.start();
|
||||||
|
@ -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}`);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,9 @@ export {
|
|||||||
|
|
||||||
// third party scope
|
// third party scope
|
||||||
import { expect } from 'chai';
|
import { expect } from 'chai';
|
||||||
|
import fastDeepEqual from 'fast-deep-equal';
|
||||||
|
|
||||||
export {
|
export {
|
||||||
|
fastDeepEqual,
|
||||||
expect
|
expect
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user