mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 19:08:15 +00:00
fix(console): handle error when inspecting promise-like (#19083)
Fixes1105900195
. This was caused by: - A `TypeError` from `core.getPromiseDetails()` for promise-likes which also lead to that code path. - Swallowing internal formatting errors by returning `undefined`. I've made it so that a special message is formatted in that case instead (note that this case is fixed now): 
This commit is contained in:
parent
2ba9ccc1ab
commit
ffb0318e4a
2 changed files with 21 additions and 29 deletions
|
@ -2235,6 +2235,13 @@ Deno.test(function inspectWithPrototypePollution() {
|
|||
}
|
||||
});
|
||||
|
||||
Deno.test(function inspectPromiseLike() {
|
||||
assertEquals(
|
||||
Deno.inspect(Object.create(Promise.prototype)),
|
||||
"Promise { <unknown> }",
|
||||
);
|
||||
});
|
||||
|
||||
Deno.test(function inspectorMethods() {
|
||||
console.timeStamp("test");
|
||||
console.profile("test");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue