(t, { noChdir } = {})
| 399 | |
| 400 | t.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) |