@@ -9,6 +9,7 @@ import { NpmConfigService } from "../../lib/services/npm-config-service";
99import { INpmConfigService } from "../../lib/declarations" ;
1010import { IProxySettings } from "../../lib/common/declarations" ;
1111import { IInjector } from "../../lib/common/definitions/yok" ;
12+ import { Arborist } from "@npmcli/arborist" ;
1213
1314import * as pacote from "pacote" ;
1415import * as tar from "tar" ;
@@ -48,10 +49,9 @@ const createTestInjector = (opts?: ITestSetup): IInjector => {
4849 testInjector . register ( "npmConfigService" , NpmConfigService ) ;
4950
5051 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 } ;
5555 isNpmConfigSet = true ;
5656 }
5757
@@ -169,8 +169,7 @@ describe("pacoteService", () => {
169169 expectedPackageName : packageName ,
170170 } ,
171171 {
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" ,
174173 manifestOptions,
175174 useProxySettings : true ,
176175 expectedPackageName : packageName ,
@@ -181,23 +180,20 @@ describe("pacoteService", () => {
181180 expectedPackageName : fullPath ,
182181 } ,
183182 {
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" ,
186184 manifestOptions,
187185 isLocalPackage : true ,
188186 expectedPackageName : fullPath ,
189187 } ,
190188 {
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" ,
193190 manifestOptions,
194191 isLocalPackage : true ,
195192 useProxySettings : true ,
196193 expectedPackageName : fullPath ,
197194 } ,
198195 {
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" ,
201197 manifestOptions,
202198 useProxySettings : true ,
203199 isLocalPackage : true ,
0 commit comments