blob: 49d5ab9be35145a05b27bde11d64e43d538a7688 (
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 { 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')
},
})
const npm = new Npm()
await npm.exec('prune', [])
})
|