MCPcopy Create free account
hub / github.com/nodejs/node / testFastPaths

Function testFastPaths

test/parallel/test-whatwg-url-canparse.js:25–29  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23 // Only javascript methods can be optimized through %OptimizeFunctionOnNextCall
24 // This is why we surround the C++ method we want to optimize with a JS function.
25 function testFastPaths() {
26 // `canParse` binding has two overloads.
27 assert.strictEqual(URL.canParse('https://www.example.com/path/?query=param#hash'), true);
28 assert.strictEqual(URL.canParse('/', 'http://n'), true);
29 }
30
31 // Since our JS function contains other javascript functions,
32 // we need to specify which function we want to optimize. This is why

Callers 1

Calls 1

canParseMethod · 0.65

Tested by

no test coverage detected