Skip to content

Commit

Permalink
Testing js.stack-trace-api option.
Browse files Browse the repository at this point in the history
(cherry picked from commit 6eecdce)
  • Loading branch information
iamstolis authored and woess committed Aug 3, 2024
1 parent fd4b7be commit 5d26b52
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions graal-js/src/com.oracle.truffle.js.test/js/GR-54930.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,21 @@
* Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
*/

/**
* Sanity check of stack-trace-api option.
*
* @option stack-trace-api=false
*/

load("assert.js");

function createError(n) {
return n ? createError(n-1) : new Error();
}

// Error.captureStackTrace should not be defined
assertSame(undefined, Error.captureStackTrace);

// Error.stackTraceLimit should have no impact on the stack property
var expected = createError(10).stack;

Expand Down

0 comments on commit 5d26b52

Please sign in to comment.