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

Function completion

deps/npm/test/lib/commands/run.js:39–44  ·  view source on GitHub ↗
(t, remain, pkg, isFish = false)

Source from the content-addressed store, hash-verified

37
38t.test('completion', async t => {
39 const completion = async (t, remain, pkg, isFish = false) => {
40 const { runScript } = await mockRs(t,
41 pkg ? { prefixDir: { 'package.json': JSON.stringify(pkg) } } : {}
42 )
43 return runScript.completion({ conf: { argv: { remain } }, isFish })
44 }
45
46 t.test('already have a script name', async t => {
47 const res = await completion(t, ['npm', 'run', 'x'])

Callers 11

testCompFunction · 0.70
run.jsFile · 0.70
completionMethod · 0.50
completionMethod · 0.50
completionMethod · 0.50
completionMethod · 0.50
execMethod · 0.50
completionMethod · 0.50
completionMethod · 0.50
completionMethod · 0.50
completionMethod · 0.50

Calls 2

mockRsFunction · 0.85
completionMethod · 0.45

Tested by

no test coverage detected