File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed
packages/acceptance-tests
pkg-tests-core/sources/utils
pkg-tests-specs/sources/commands Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ function isAtLeastMajor(major: number) {
3636}
3737
3838export const FEATURE_CHECKS = {
39+ jsonLockfile : isAtLeastMajor ( 5 ) ,
3940 prologConstraints : ! isAtLeastMajor ( 5 ) ,
4041} as const ;
4142
Original file line number Diff line number Diff line change @@ -351,13 +351,25 @@ describe(`Commands`, () => {
351351 const content = await xfs . readFilePromise ( `${ path } /yarn.lock` as PortablePath , `utf8` ) ;
352352 const lock = parseSyml ( content ) ;
353353
354- expect ( lock ) . toMatchObject ( {
354+ const expectedLockfile = tests . FEATURE_CHECKS . jsonLockfile ? {
355+ entries : {
356+ [ `inject-node-gyp@npm:^1.0.0` ] : {
357+ resolution : {
358+ dependencies : {
359+ [ `node-gyp` ] : `*` ,
360+ } ,
361+ } ,
362+ } ,
363+ } ,
364+ } : {
355365 [ `inject-node-gyp@npm:^1.0.0` ] : {
356366 dependencies : {
357367 [ `node-gyp` ] : `npm:latest` ,
358368 } ,
359369 } ,
360- } ) ;
370+ } ;
371+
372+ expect ( lock ) . toMatchObject ( expectedLockfile ) ;
361373 } ) ,
362374 ) ;
363375
You can’t perform that action at this time.
0 commit comments