(argv, expect)
| 9 | t.test('completion', async t => { |
| 10 | const { access } = await loadMockNpm(t, { command: 'access' }) |
| 11 | const testComp = (argv, expect) => { |
| 12 | const res = access.completion({ conf: { argv: { remain: argv } } }) |
| 13 | t.resolves(res, expect, argv.join(' ')) |
| 14 | } |
| 15 | |
| 16 | testComp(['npm', 'access'], ['list', 'get', 'set', 'grant', 'revoke']) |
| 17 | testComp(['npm', 'access', 'list'], ['packages', 'collaborators']) |
no test coverage detected