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

Function test

deps/v8/test/mjsunit/regexp-peephole.js:7–14  ·  view source on GitHub ↗
(re, expectMatch, expectNoMatch = [])

Source from the content-addressed store, hash-verified

5// Test peephole optimization patterns not covered by other tests.
6
7function test(re, expectMatch, expectNoMatch = []) {
8 for (const match of expectMatch) {
9 assertTrue(re.test(match), `${re}.test(${match})`);
10 }
11 for (const noMatch of expectNoMatch) {
12 assertFalse(re.test(noMatch), `${re}.test(${noMatch})`);
13 }
14}
15
16// Test SkipUntilMatchInAlternativeWithFewChars
17test(

Callers 1

regexp-peephole.jsFile · 0.70

Calls 3

assertTrueFunction · 0.70
assertFalseFunction · 0.50
testMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…