@@ -9,6 +9,7 @@ import { NpmConfigService } from "../../lib/services/npm-config-service";
9
9
import { INpmConfigService } from "../../lib/declarations" ;
10
10
import { IProxySettings } from "../../lib/common/declarations" ;
11
11
import { IInjector } from "../../lib/common/definitions/yok" ;
12
+ import { Arborist } from "@npmcli/arborist" ;
12
13
13
14
import * as pacote from "pacote" ;
14
15
import * as tar from "tar" ;
@@ -48,10 +49,9 @@ const createTestInjector = (opts?: ITestSetup): IInjector => {
48
49
testInjector . register ( "npmConfigService" , NpmConfigService ) ;
49
50
50
51
if ( ! isNpmConfigSet ) {
51
- const npmConfigService : INpmConfigService = testInjector . resolve (
52
- "npmConfigService"
53
- ) ;
54
- defaultPacoteOpts = npmConfigService . getConfig ( ) ;
52
+ const npmConfigService : INpmConfigService =
53
+ testInjector . resolve ( "npmConfigService" ) ;
54
+ defaultPacoteOpts = { ...npmConfigService . getConfig ( ) , Arborist } ;
55
55
isNpmConfigSet = true ;
56
56
}
57
57
@@ -169,8 +169,7 @@ describe("pacoteService", () => {
169
169
expectedPackageName : packageName ,
170
170
} ,
171
171
{
172
- name :
173
- "with 'cache', passed options and proxy settings when proxy is configured" ,
172
+ name : "with 'cache', passed options and proxy settings when proxy is configured" ,
174
173
manifestOptions,
175
174
useProxySettings : true ,
176
175
expectedPackageName : packageName ,
@@ -181,23 +180,20 @@ describe("pacoteService", () => {
181
180
expectedPackageName : fullPath ,
182
181
} ,
183
182
{
184
- name :
185
- "with full path to file, 'cache' and passed options when local path is passed" ,
183
+ name : "with full path to file, 'cache' and passed options when local path is passed" ,
186
184
manifestOptions,
187
185
isLocalPackage : true ,
188
186
expectedPackageName : fullPath ,
189
187
} ,
190
188
{
191
- name :
192
- "with full path to file, 'cache' and proxy settings when proxy is configured" ,
189
+ name : "with full path to file, 'cache' and proxy settings when proxy is configured" ,
193
190
manifestOptions,
194
191
isLocalPackage : true ,
195
192
useProxySettings : true ,
196
193
expectedPackageName : fullPath ,
197
194
} ,
198
195
{
199
- name :
200
- "with full path to file, 'cache', passed options and proxy settings when proxy is configured and local path is passed" ,
196
+ name : "with full path to file, 'cache', passed options and proxy settings when proxy is configured and local path is passed" ,
201
197
manifestOptions,
202
198
useProxySettings : true ,
203
199
isLocalPackage : true ,
0 commit comments