@@ -53,11 +53,11 @@ t.test('editor', t => {
53
53
t . test ( 'has neither EDITOR nor VISUAL, system specific' , t => {
54
54
mockGlobals ( t , { 'process.env' : { EDITOR : undefined , VISUAL : undefined } } )
55
55
const defsWin = t . mock ( defpath , {
56
- [ isWin ] : true ,
56
+ [ isWin ] : { isWindows : true } ,
57
57
} )
58
58
t . equal ( defsWin . editor . default , 'notepad.exe' )
59
59
const defsNix = t . mock ( defpath , {
60
- [ isWin ] : false ,
60
+ [ isWin ] : { isWindows : false } ,
61
61
} )
62
62
t . equal ( defsNix . editor . default , 'vi' )
63
63
t . end ( )
@@ -69,12 +69,12 @@ t.test('shell', t => {
69
69
t . test ( 'windows, env.ComSpec then cmd.exe' , t => {
70
70
mockGlobals ( t , { 'process.env.ComSpec' : 'command.com' } )
71
71
const defsComSpec = t . mock ( defpath , {
72
- [ isWin ] : true ,
72
+ [ isWin ] : { isWindows : true } ,
73
73
} )
74
74
t . equal ( defsComSpec . shell . default , 'command.com' )
75
75
mockGlobals ( t , { 'process.env.ComSpec' : undefined } )
76
76
const defsNoComSpec = t . mock ( defpath , {
77
- [ isWin ] : true ,
77
+ [ isWin ] : { isWindows : true } ,
78
78
} )
79
79
t . equal ( defsNoComSpec . shell . default , 'cmd' )
80
80
t . end ( )
@@ -83,12 +83,12 @@ t.test('shell', t => {
83
83
t . test ( 'nix, SHELL then sh' , t => {
84
84
mockGlobals ( t , { 'process.env.SHELL' : '/usr/local/bin/bash' } )
85
85
const defsShell = t . mock ( defpath , {
86
- [ isWin ] : false ,
86
+ [ isWin ] : { isWindows : false } ,
87
87
} )
88
88
t . equal ( defsShell . shell . default , '/usr/local/bin/bash' )
89
89
mockGlobals ( t , { 'process.env.SHELL' : undefined } )
90
90
const defsNoShell = t . mock ( defpath , {
91
- [ isWin ] : false ,
91
+ [ isWin ] : { isWindows : false } ,
92
92
} )
93
93
t . equal ( defsNoShell . shell . default , 'sh' )
94
94
t . end ( )
@@ -158,18 +158,18 @@ t.test('unicode allowed?', t => {
158
158
t . test ( 'cache' , t => {
159
159
mockGlobals ( t , { 'process.env.LOCALAPPDATA' : 'app/data/local' } )
160
160
const defsWinLocalAppData = t . mock ( defpath , {
161
- [ isWin ] : true ,
161
+ [ isWin ] : { isWindows : true } ,
162
162
} )
163
163
t . equal ( defsWinLocalAppData . cache . default , 'app/data/local/npm-cache' )
164
164
165
165
mockGlobals ( t , { 'process.env.LOCALAPPDATA' : undefined } )
166
166
const defsWinNoLocalAppData = t . mock ( defpath , {
167
- [ isWin ] : true ,
167
+ [ isWin ] : { isWindows : true } ,
168
168
} )
169
169
t . equal ( defsWinNoLocalAppData . cache . default , '~/npm-cache' )
170
170
171
171
const defsNix = t . mock ( defpath , {
172
- [ isWin ] : false ,
172
+ [ isWin ] : { isWindows : false } ,
173
173
} )
174
174
t . equal ( defsNix . cache . default , '~/.npm' )
175
175
0 commit comments