MCPcopy Index your code
hub / github.com/nodejs/node / checkStack

Function checkStack

test/parallel/test-internal-util-decorate-error-stack.js:30–39  ·  view source on GitHub ↗
(stack)

Source from the content-addressed store, hash-verified

28
29// Verify that the stack is decorated when possible.
30function checkStack(stack) {
31 // Matching only on a minimal piece of the stack because the string will vary
32 // greatly depending on the JavaScript engine. V8 includes `;` because it
33 // displays the line of code (`var foo bar;`) that is causing a problem.
34 // ChakraCore does not display the line of code but includes `;` in the phrase
35 // `Expected ';' `.
36 assert.match(stack, /;/g);
37 // Test that it's a multiline string.
38 assert.match(stack, /\n/g);
39}
40let err;
41const badSyntaxPath =
42 fixtures.path('syntax', 'bad_syntax').replace(/\\/g, '\\\\');

Calls 1

matchMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…