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

Function mockComp

deps/npm/test/lib/commands/install.js:401–411  ·  view source on GitHub ↗
(t, { noChdir } = {})

Source from the content-addressed store, hash-verified

399
400t.test('completion', async t => {
401 const mockComp = async (t, { noChdir } = {}) => loadMockNpm(t, {
402 command: 'install',
403 prefixDir: {
404 arborist: {
405 'package.json': '{}',
406 },
407 'arborist.txt': 'just a file',
408 'other-dir': { a: 'a' },
409 },
410 ...(noChdir ? { chdir: false } : {}),
411 })
412
413 await t.test('completion to folder - has a match', async t => {
414 const { install } = await mockComp(t)

Callers 1

install.jsFile · 0.85

Calls 1

loadMockNpmFunction · 0.70

Tested by

no test coverage detected