@@ -120,15 +120,15 @@ describe('Unit: Tasks > yarn-install', function () {
120
120
const dist = proxyquire ( modulePath , {
121
121
'package-json' : infoStub
122
122
} ) . subTasks . dist ;
123
- const ctx = { version : '1.5.0' } ;
123
+ const ctx = { version : '1.5.0' , agent : false } ;
124
124
125
125
return dist ( ctx ) . then ( ( ) => {
126
126
expect ( false , 'error should have been thrown' ) . to . be . true ;
127
127
} ) . catch ( ( error ) => {
128
128
expect ( error ) . to . be . an . instanceof ( errors . SystemError ) ;
129
129
expect ( error . message ) . to . equal ( 'Ghost v1.5.0 is not compatible with the current Node version.' ) ;
130
130
expect ( infoStub . calledOnce ) . to . be . true ;
131
- expect ( infoStub . calledWithExactly ( 'ghost' , { version : '1.5.0' } ) ) . to . be . true ;
131
+ expect ( infoStub . calledWithExactly ( 'ghost' , { version : '1.5.0' , agent : false } ) ) . to . be . true ;
132
132
} ) ;
133
133
} ) ;
134
134
@@ -141,14 +141,15 @@ describe('Unit: Tasks > yarn-install', function () {
141
141
const dist = proxyquire ( modulePath , {
142
142
'package-json' : infoStub
143
143
} ) . subTasks . dist ;
144
- const ctx = { version : '1.5.0' } ;
144
+ const ctx = { version : '1.5.0' , agent : false } ;
145
145
process . env . GHOST_NODE_VERSION_CHECK = 'false' ;
146
146
147
147
return dist ( ctx ) . then ( ( ) => {
148
148
delete process . env . GHOST_NODE_VERSION_CHECK ;
149
149
expect ( infoStub . calledOnce ) . to . be . true ;
150
- expect ( infoStub . calledWithExactly ( 'ghost' , { version : '1.5.0' } ) ) . to . be . true ;
150
+ expect ( infoStub . calledWithExactly ( 'ghost' , { version : '1.5.0' , agent : false } ) ) . to . be . true ;
151
151
expect ( ctx ) . to . deep . equal ( {
152
+ agent : false ,
152
153
version : '1.5.0' ,
153
154
shasum : 'asdf1234' ,
154
155
tarball : 'something.tgz'
@@ -169,15 +170,15 @@ describe('Unit: Tasks > yarn-install', function () {
169
170
'package-json' : infoStub ,
170
171
'../../package.json' : { version : '1.0.0' }
171
172
} ) . subTasks . dist ;
172
- const ctx = { version : '1.5.0' } ;
173
+ const ctx = { version : '1.5.0' , agent : false } ;
173
174
174
175
return dist ( ctx ) . then ( ( ) => {
175
176
expect ( false , 'error should have been thrown' ) . to . be . true ;
176
177
} ) . catch ( ( error ) => {
177
178
expect ( error ) . to . be . an . instanceof ( errors . SystemError ) ;
178
179
expect ( error . message ) . to . equal ( 'Ghost v1.5.0 is not compatible with this version of the CLI.' ) ;
179
180
expect ( infoStub . calledOnce ) . to . be . true ;
180
- expect ( infoStub . calledWithExactly ( 'ghost' , { version : '1.5.0' } ) ) . to . be . true ;
181
+ expect ( infoStub . calledWithExactly ( 'ghost' , { version : '1.5.0' , agent : false } ) ) . to . be . true ;
181
182
} ) ;
182
183
} ) ;
183
184
@@ -191,12 +192,13 @@ describe('Unit: Tasks > yarn-install', function () {
191
192
'package-json' : infoStub ,
192
193
'../../package.json' : { version : '1.10.0-beta.0' }
193
194
} ) . subTasks . dist ;
194
- const ctx = { version : '1.5.0' } ;
195
+ const ctx = { version : '1.5.0' , agent : false } ;
195
196
196
197
return dist ( ctx ) . then ( ( ) => {
197
198
expect ( infoStub . calledOnce ) . to . be . true ;
198
- expect ( infoStub . calledWithExactly ( 'ghost' , { version : '1.5.0' } ) ) . to . be . true ;
199
+ expect ( infoStub . calledWithExactly ( 'ghost' , { version : '1.5.0' , agent : false } ) ) . to . be . true ;
199
200
expect ( ctx ) . to . deep . equal ( {
201
+ agent : false ,
200
202
version : '1.5.0' ,
201
203
shasum : 'asdf1234' ,
202
204
tarball : 'something.tgz'
@@ -210,12 +212,13 @@ describe('Unit: Tasks > yarn-install', function () {
210
212
const dist = proxyquire ( modulePath , {
211
213
'package-json' : infoStub
212
214
} ) . subTasks . dist ;
213
- const ctx = { version : '1.5.0' } ;
215
+ const ctx = { version : '1.5.0' , agent : false } ;
214
216
215
217
return dist ( ctx ) . then ( ( ) => {
216
218
expect ( infoStub . calledOnce ) . to . be . true ;
217
- expect ( infoStub . calledWithExactly ( 'ghost' , { version : '1.5.0' } ) ) . to . be . true ;
219
+ expect ( infoStub . calledWithExactly ( 'ghost' , { version : '1.5.0' , agent : false } ) ) . to . be . true ;
218
220
expect ( ctx ) . to . deep . equal ( {
221
+ agent : false ,
219
222
version : '1.5.0' ,
220
223
shasum : 'asdf1234' ,
221
224
tarball : 'something.tgz'
0 commit comments