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

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGar <gar+gh@danger.computer>2022-03-24 01:16:49 +0300
committerLuke Karrys <luke@lukekarrys.com>2022-03-28 23:21:36 +0300
commit45dd8b8615bb1d7a93e1733746581049a1f399e6 (patch)
tree0e8a1df227b0258714f0637d82720374f5bf4fb3 /test
parent99d88454248f950b82652b592fe2b4d019c1060b (diff)
fix: move shellout logic into commands
Each command now signals whether or not it is a shellout
Diffstat (limited to 'test')
-rw-r--r--test/lib/npm.js1
-rw-r--r--test/lib/utils/exit-handler.js5
2 files changed, 4 insertions, 2 deletions
diff --git a/test/lib/npm.js b/test/lib/npm.js
index 4302437a6..541c1258d 100644
--- a/test/lib/npm.js
+++ b/test/lib/npm.js
@@ -43,7 +43,6 @@ t.test('not yet loaded', async t => {
set: Function,
},
version: String,
- shelloutCommands: Array,
})
t.throws(() => npm.config.set('foo', 'bar'))
t.throws(() => npm.config.get('foo'))
diff --git a/test/lib/utils/exit-handler.js b/test/lib/utils/exit-handler.js
index 73bbf06fe..23942cca1 100644
--- a/test/lib/utils/exit-handler.js
+++ b/test/lib/utils/exit-handler.js
@@ -32,7 +32,7 @@ t.cleanSnapshot = (path) => cleanDate(cleanCwd(path))
// nerf itself, thinking global.process is broken or gone.
mockGlobals(t, {
process: Object.assign(new EventEmitter(), {
- ...pick(process, 'execPath', 'stdout', 'stderr', 'cwd', 'env'),
+ ...pick(process, 'execPath', 'stdout', 'stderr', 'cwd', 'env', 'umask'),
argv: ['/node', ...process.argv.slice(1)],
version: 'v1.0.0',
kill: () => {},
@@ -450,7 +450,10 @@ t.test('exits uncleanly when only emitting exit event', async (t) => {
t.test('do no fancy handling for shellouts', async t => {
const { exitHandler, npm, logs } = await mockExitHandler(t)
+ const exec = await npm.cmd('exec')
+
npm.command = 'exec'
+ npm.commandInstance = exec
const loudNoises = () =>
logs.filter(([level]) => ['warn', 'error'].includes(level))