1const t = require('tap') 2const tmock = require('../../fixtures/tmock') 3 4t.test('ll', t => { 5 t.plan(3) 6 7 class LS { 8 constructor (npm) { 9 this.npm = npm 10 } 11 12 async exec (args) { 13 t.same(args, ['pkg'], 'should forward args') 14 } 15 } 16 17 const LL = tmock(t, '{LIB}/commands/ll.js', { 18 '{LIB}/commands/ls.js': LS, 19 }) 20 const ll = new LL({ 21 config: { 22 set: (key, value) => { 23 t.equal(key, 'long', 'should set long config value') 24 t.equal(value, true, 'should set a truthy value') 25 }, 26 }, 27 }) 28 29 ll.exec(['pkg'], err => { 30 if (err) { 31 throw err 32 } 33 }) 34}) 35