From 5d26b522cc4273014cbb8fe76c80540f5ce2c942 Mon Sep 17 00:00:00 2001 From: Jan Stola Date: Sun, 14 Jul 2024 13:35:27 +0200 Subject: [PATCH] Testing js.stack-trace-api option. (cherry picked from commit 6eecdcec08e2b9bf17a13fb96c3eabe4618b2aa0) --- graal-js/src/com.oracle.truffle.js.test/js/GR-54930.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/graal-js/src/com.oracle.truffle.js.test/js/GR-54930.js b/graal-js/src/com.oracle.truffle.js.test/js/GR-54930.js index 10e61d0d3a7..647e02949f5 100644 --- a/graal-js/src/com.oracle.truffle.js.test/js/GR-54930.js +++ b/graal-js/src/com.oracle.truffle.js.test/js/GR-54930.js @@ -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;