Skip to content

Commit d811d74

Browse files
committed
chore: fix devEngine test nits
1 parent e59797f commit d811d74

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

tap-snapshots/test/lib/commands/install.js.test.cjs

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,6 @@
55
* Make sure to inspect the output below. Do not ignore changes!
66
*/
77
'use strict'
8-
exports[`test/lib/commands/install.js TAP devEngines should not utilize devEngines if global install > must match snapshot 1`] = `
9-
silly config load:file:{CWD}/npmrc
10-
silly config load:file:{CWD}/home/.npmrc
11-
silly config load:file:{CWD}/global/etc/npmrc
12-
verbose title npm
13-
verbose argv "--fetch-retries" "0" "--cache" "{CWD}/cache" "--loglevel" "silly" "--color" "false" "--global" "true"
14-
verbose logfile logs-max:10 dir:{CWD}/cache/_logs/{DATE}-
15-
verbose logfile {CWD}/cache/_logs/{DATE}-debug-0.log
16-
silly logfile done cleaning log files
17-
silly packumentCache heap:{heap} maxSize:{maxSize} maxEntrySize:{maxEntrySize}
18-
silly idealTree buildDeps
19-
silly placeDep ROOT alpha@ OK for: want: file:../../prefix
20-
silly reify moves {}
21-
silly ADD node_modules/alpha
22-
23-
added 1 package in {TIME}
24-
`
25-
268
exports[`test/lib/commands/install.js TAP devEngines should not utilize engines in root if devEngines is provided > must match snapshot 1`] = `
279
silly config load:file:{CWD}/npmrc
2810
silly config load:file:{CWD}/prefix/.npmrc
@@ -99,6 +81,24 @@ added 1 package, and audited 3 packages in {TIME}
9981
found 0 vulnerabilities
10082
`
10183

84+
exports[`test/lib/commands/install.js TAP devEngines should show devEngines has no effect on global package install > must match snapshot 1`] = `
85+
silly config load:file:{CWD}/npmrc
86+
silly config load:file:{CWD}/home/.npmrc
87+
silly config load:file:{CWD}/global/etc/npmrc
88+
verbose title npm
89+
verbose argv "--fetch-retries" "0" "--cache" "{CWD}/cache" "--loglevel" "silly" "--color" "false" "--global" "true"
90+
verbose logfile logs-max:10 dir:{CWD}/cache/_logs/{DATE}-
91+
verbose logfile {CWD}/cache/_logs/{DATE}-debug-0.log
92+
silly logfile done cleaning log files
93+
silly packumentCache heap:{heap} maxSize:{maxSize} maxEntrySize:{maxEntrySize}
94+
silly idealTree buildDeps
95+
silly placeDep ROOT alpha@ OK for: want: file:../../prefix
96+
silly reify moves {}
97+
silly ADD node_modules/alpha
98+
99+
added 1 package in {TIME}
100+
`
101+
102102
exports[`test/lib/commands/install.js TAP devEngines should show devEngines has no effect on package install > must match snapshot 1`] = `
103103
silly config load:file:{CWD}/npmrc
104104
silly config load:file:{CWD}/prefix/.npmrc

test/lib/commands/install.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -688,12 +688,9 @@ t.test('devEngines', async t => {
688688
t.ok(!output.includes('EBADDEVENGINES'))
689689
})
690690

691-
t.test('should not utilize devEngines if global install', async t => {
691+
t.test('should show devEngines has no effect on global package install', async t => {
692692
const { npm, joinedFullOutput } = await loadMockNpm(t, {
693693
...mockArguments,
694-
config: {
695-
global: true,
696-
},
697694
prefixDir: {
698695
'package.json': JSON.stringify({
699696
name: 'alpha',
@@ -709,6 +706,9 @@ t.test('devEngines', async t => {
709706
}),
710707
'index.js': 'console.log("this is alpha index")',
711708
},
709+
config: {
710+
global: true,
711+
},
712712
})
713713
await npm.exec('install', ['.'])
714714
const output = joinedFullOutput()

0 commit comments

Comments
 (0)