Skip to content

Commit a085123

Browse files
test: pin the round-trip with strict equality
`toEqual` ignores an undefined property and a swapped prototype, so the two cases the dispatch table exists for — `d: undefined` and the null-prototype object — would have passed even if the format dropped them.
1 parent ae200f7 commit a085123

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎test/ObjectMiddleware.unittest.js‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ const logger = new Logger(
1414
const context = { logger };
1515

1616
/**
17-
* Round-trips a value through serialize + deserialize.
1817
* @param {EXPECTED_ANY} value the value to round-trip
1918
* @returns {EXPECTED_ANY} what came back
2019
*/
@@ -64,7 +63,7 @@ describe("ObjectMiddleware", () => {
6463
for (const name of Object.keys(cases)) {
6564
it(`round-trips ${name}`, () => {
6665
const value = cases[/** @type {keyof typeof cases} */ (name)];
67-
expect(roundTrip(value)).toEqual(value);
66+
expect(roundTrip(value)).toStrictEqual(value);
6867
});
6968
}
7069

0 commit comments

Comments
 (0)