blob: 3e47feb46139426e10d105b4ea454d96f564f62b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
const t = require('tap')
const { real: mockNpm } = require('../fixtures/mock-npm')
t.test('should prune using Arborist', async (t) => {
t.plan(4)
const { command, npm } = mockNpm(t, {
'@npmcli/arborist': function (args) {
t.ok(args, 'gets options object')
t.ok(args.path, 'gets path option')
this.prune = () => {
t.ok(true, 'prune is called')
}
},
'../../lib/utils/reify-finish.js': (arb) => {
t.ok(arb, 'gets arborist tree')
},
})
await npm.load()
await command('prune')
})
|