Skip to content

Commit 0c76487

Browse files
nlfNathan Fritz
authored andcommitted
chore(arborist): update printable tree test to be a valid tree
1 parent fe4a3d0 commit 0c76487

2 files changed

Lines changed: 9 additions & 11 deletions

File tree

workspaces/arborist/tap-snapshots/test/printable.js.test.cjs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -564,24 +564,24 @@ version:'1.0.0',
564564
location:'',
565565
path:'/some/path',
566566
isProjectRoot:true,
567-
overrides:Map{'foo@1' => '2.0.0', 'bar' => '2.0.0'},
568-
edgesOut:Map{
569-
'bar' =>{prod bar@^1.0.0 overridden:2.0.0 -> node_modules/bar},
570-
'foo' =>{prod foo@^1.0.0 overridden:2.0.0 -> node_modules/foo}},
567+
overrides:Map{'bar' => '2.0.0'},
568+
edgesOut:Map{'foo' =>{prod foo@^1.0.0 -> node_modules/foo}},
571569
children:Map{
572570
'bar' =>{
573571
name:'bar',
574572
version:'2.0.0',
575573
location:'node_modules/bar',
576574
path:'/some/path/node_modules/bar',
577-
overrides:Map{'bar' => '2.0.0', 'foo@1' => '2.0.0'},
578-
edgesIn:Set{{"" prod bar@^1.0.0}}},
575+
overrides:Map{'bar' => '2.0.0'},
576+
edgesIn:Set{{node_modules/foo prod bar@^1.0.0}}},
579577
'foo' =>{
580578
name:'foo',
581-
version:'2.0.0',
579+
version:'1.0.0',
582580
location:'node_modules/foo',
583581
path:'/some/path/node_modules/foo',
584-
overrides:Map{'foo@1' => '2.0.0', 'bar' => '2.0.0'},
582+
overrides:Map{'bar' => '2.0.0'},
583+
edgesOut:Map{
584+
'bar' =>{prod bar@^1.0.0 overridden:2.0.0 -> node_modules/bar}},
585585
edgesIn:Set{{"" prod foo@^1.0.0}}}}}
586586
`
587587

workspaces/arborist/test/printable.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -421,15 +421,13 @@ t.test('show overrides', (t) => {
421421
version: '1.0.0',
422422
dependencies: {
423423
foo: '^1.0.0',
424-
bar: '^1.0.0',
425424
},
426425
overrides: {
427-
'foo@1': '2.0.0',
428426
bar: '2.0.0',
429427
},
430428
},
431429
children: [
432-
{ pkg: { name: 'foo', version: '2.0.0' }, ...flags },
430+
{ pkg: { name: 'foo', version: '1.0.0', dependencies: { bar: '^1.0.0' } }, ...flags },
433431
{ pkg: { name: 'bar', version: '2.0.0' }, ...flags },
434432
],
435433
...flags,

0 commit comments

Comments
 (0)