mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 12:19:12 +00:00
fix(ext/node): improve comparison of faked objects in deepStrictEqual
(#29819)
This commit improves the handling of objects with faked prototypes in `deepStrictEqual`. This enables `parallel/test-assert-checktag.js` - `Date` objects are checked by `core.isDate` - In object comparison, now it checks `obj.toString()` output (The difference of `Symbol.toStringTag` is now detected). - Stoped using std's assertion error message for `deepStrictEqual`, but started using Node.js version of diff string. Now the diff expression is more compatible with Node.
This commit is contained in:
parent
1e9415cda8
commit
c538f44fa0
8 changed files with 109 additions and 19 deletions
|
@ -348,8 +348,9 @@ export function createErrDiff(
|
|||
`${blue}...${defaultColor}`;
|
||||
}
|
||||
}
|
||||
|
||||
return `${msg}${skipped ? skippedMsg : ""}\n${res}${other}${end}${indicator}`;
|
||||
return `${msg}${
|
||||
skipped ? skippedMsg : ""
|
||||
}\n${res}${other}${end}${indicator}\n`;
|
||||
}
|
||||
|
||||
export interface AssertionErrorDetailsDescriptor {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue