diff options
Diffstat (limited to 'deps/npm/test/tap/init-interrupt.js')
-rw-r--r-- | deps/npm/test/tap/init-interrupt.js | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/deps/npm/test/tap/init-interrupt.js b/deps/npm/test/tap/init-interrupt.js deleted file mode 100644 index 38c38053e5..0000000000 --- a/deps/npm/test/tap/init-interrupt.js +++ /dev/null @@ -1,38 +0,0 @@ -/* eslint-disable standard/no-callback-literal */ -// if 'npm init' is interrupted with ^C, don't report -// 'init written successfully' -var test = require('tap').test -var npmlog = require('npmlog') -var requireInject = require('require-inject') - -var npm = require('../../lib/npm.js') - -require('../common-tap.js') - -test('issue #6684 remove confusing message', function (t) { - var initJsonMock = function (dir, input, config, cb) { - process.nextTick(function () { - cb({ message: 'canceled' }) - }) - } - initJsonMock.yes = function () { return true } - - npm.load({ loglevel: 'silent' }, function () { - var log = '' - var init = requireInject('../../lib/init', { - 'init-package-json': initJsonMock - }) - - // capture log messages - npmlog.on('log', function (chunk) { log += chunk.message + '\n' }) - - init([], function (err, code) { - t.ifError(err, 'init ran successfully') - t.notOk(code, 'exited without issue') - t.notSimilar(log, /written successfully/, 'no success message written') - t.similar(log, /canceled/, 'alerted that init was canceled') - - t.end() - }) - }) -}) |