mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 04:49:35 +00:00
testing: fix undefined not being reported correctly in results
Fixes #125669
This commit is contained in:
parent
6e35422648
commit
c6d7cfed8a
|
@ -224,6 +224,10 @@ function serializeError(err) {
|
|||
function safeStringify(obj) {
|
||||
const seen = new Set();
|
||||
return JSON.stringify(obj, (key, value) => {
|
||||
if (value === undefined) {
|
||||
return '[undefined]';
|
||||
}
|
||||
|
||||
if (isObject(value) || Array.isArray(value)) {
|
||||
if (seen.has(value)) {
|
||||
return '[Circular]';
|
||||
|
|
Loading…
Reference in a new issue