From ef7ad927ed60eabb7fa62793611a68beed475293 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bargull?= Date: Wed, 30 Apr 2025 14:16:14 +0200 Subject: [PATCH] Remove test for non-standard Error stack --- .../syntax-parsed-arrow-then-directive.js | 22 ------------------- 1 file changed, 22 deletions(-) diff --git a/test/staging/sm/syntax/syntax-parsed-arrow-then-directive.js b/test/staging/sm/syntax/syntax-parsed-arrow-then-directive.js index 1bea94c801..375b8e78b9 100644 --- a/test/staging/sm/syntax/syntax-parsed-arrow-then-directive.js +++ b/test/staging/sm/syntax/syntax-parsed-arrow-then-directive.js @@ -11,50 +11,28 @@ description: | esid: pending ---*/ -var stack; - -function reset() -{ - stack = ""; -} - -function assertStackContains(needle, msg) -{ - assert.sameValue(stack.indexOf(needle) >= 0, true, - `stack should contain '${needle}': ${msg}`); -} - Object.defineProperty(this, "detectSourceURL", { get() { - stack = new Error().stack; return 17; } }); // block followed by semicolon -reset(); assert.sameValue(eval(`x=>{}; //# sourceURL=http://example.com/foo.js detectSourceURL`), 17); -assertStackContains("http://example.com/foo.js", "block, semi"); // block not followed by semicolon -reset(); assert.sameValue(eval(`x=>{} //# sourceURL=http://example.com/bar.js detectSourceURL`), 17); -assertStackContains("http://example.com/bar.js", "block, not semi"); // expr followed by semicolon -reset(); assert.sameValue(eval(`x=>y; //# sourceURL=http://example.com/baz.js detectSourceURL`), 17); -assertStackContains("http://example.com/baz.js", "expr, semi"); // expr not followed by semicolon -reset(); assert.sameValue(eval(`x=>y //# sourceURL=http://example.com/quux.js detectSourceURL`), 17); -assertStackContains("http://example.com/quux.js", "expr, not semi");