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

find-dupes.js « lib « test - github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 73c8fa2dc2793f16a33ea219ccc645d42ae28065 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
const { test } = require('tap')
const requireInject = require('require-inject')

test('should run dedupe in dryRun mode', (t) => {
  const findDupes = requireInject('../../lib/find-dupes.js', {
    '../../lib/dedupe.js': function (args, cb) {
      t.ok(args.dryRun, 'dryRun is true')
      cb()
    },
  })
  findDupes(null, () => {
    t.ok(true, 'callback is called')
    t.end()
  })
})