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

Function assertStartsWith

test/es-module/test-esm-imports.mjs:131–134  ·  view source on GitHub ↗
(actual, expected)

Source from the content-addressed store, hash-verified

129}));
130
131function assertStartsWith(actual, expected) {
132 const start = actual.toString().slice(0, expected.length);
133 assert.strictEqual(start, expected);
134}
135
136function assertIncludes(actual, expected) {
137 assert.ok(actual.toString().indexOf(expected) !== -1,

Callers 1

Calls 2

sliceMethod · 0.65
toStringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…