Welcome to mirror list, hosted at ThFree Co, Russian Federation.

prefix.js « lib « test « npm « deps - github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 526631388e74ffc61bb6ce49df54d2cb4a2f700e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
const t = require('tap')

t.test('prefix', (t) => {
  t.plan(3)
  const dir = '/prefix/dir'

  const Prefix = require('../../lib/prefix.js')
  const prefix = new Prefix({
    prefix: dir,
    output: (output) => {
      t.equal(output, dir, 'prints the correct directory')
    },
  })

  prefix.exec([], (err) => {
    t.error(err, 'npm prefix')
    t.ok('should have printed directory')
  })
})