Skip to content

Commit

Permalink
test(object-inspect): DAGs are not Circular, but may have cyclic nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfig committed Apr 9, 2022
1 parent 387afe5 commit a92037a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/xsnap/test/test-inspect.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ const testCases = [
'(() => { const circ = {}; circ.ref = circ; return circ; })()',
'{ ref: [Circular] }',
],
[
'(() => { const circ = {}; circ.ref = circ; return [circ, circ, { again: circ }]; })()',
'[ { ref: [Circular] }, { ref: [Circular] }, { again: { ref: [Circular] } } ]',
],
['new Error("foo")', '[Error: foo]'],
['new TypeError("foo2")', '[TypeError: foo2]'],
['new Function("bar", 1)', '[Function: anonymous]'],
Expand Down

0 comments on commit a92037a

Please sign in to comment.