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) {
36
36
}
37
37
38
38
export const FEATURE_CHECKS = {
39
+ jsonLockfile : isAtLeastMajor ( 5 ) ,
39
40
prologConstraints : ! isAtLeastMajor ( 5 ) ,
40
41
} as const ;
41
42
Original file line number Diff line number Diff line change @@ -351,13 +351,25 @@ describe(`Commands`, () => {
351
351
const content = await xfs . readFilePromise ( `${ path } /yarn.lock` as PortablePath , `utf8` ) ;
352
352
const lock = parseSyml ( content ) ;
353
353
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
+ } : {
355
365
[ `inject-node-gyp@npm:^1.0.0` ] : {
356
366
dependencies : {
357
367
[ `node-gyp` ] : `npm:latest` ,
358
368
} ,
359
369
} ,
360
- } ) ;
370
+ } ;
371
+
372
+ expect ( lock ) . toMatchObject ( expectedLockfile ) ;
361
373
} ) ,
362
374
) ;
363
375
You can’t perform that action at this time.
0 commit comments