@@ -149,11 +149,7 @@ t.test('ls', (t) => {
149
149
...simpleNmFixture ,
150
150
} )
151
151
ls . exec ( [ ] , ( err ) => {
152
- t . match ( err . code , 'ELSPROBLEMS' , 'should have ELSPROBLEMS error code' )
153
- t . matchSnapshot (
154
- redactCwd ( err . message ) ,
155
- 'should log all extraneous deps on error msg'
156
- )
152
+ t . error ( err ) // should not error for extraneous
157
153
t . matchSnapshot ( redactCwd ( result ) , 'should output tree missing name/version of top-level package' )
158
154
t . end ( )
159
155
} )
@@ -171,12 +167,7 @@ t.test('ls', (t) => {
171
167
...simpleNmFixture ,
172
168
} )
173
169
ls . exec ( [ ] , ( err ) => {
174
- t . equal ( err . code , 'ELSPROBLEMS' , 'should have error code' )
175
- t . equal (
176
- redactCwd ( err . message ) ,
177
- 'extraneous: [email protected] {CWD}/tap-testdir-ls-ls-extraneous-deps/node_modules/lorem' ,
178
- 'should log extraneous dep as error'
179
- )
170
+ t . error ( err ) // should not error for extraneous
180
171
t . matchSnapshot ( redactCwd ( result ) , 'should output containing problems info' )
181
172
t . end ( )
182
173
} )
@@ -1410,7 +1401,7 @@ t.test('ls', (t) => {
1410
1401
} )
1411
1402
1412
1403
ls . exec ( [ 'c' ] , ( err ) => {
1413
- t . match ( err . code , 'ELSPROBLEMS' , ' should have ELSPROBLEMS error code' )
1404
+ t . error ( err ) // should not error for extraneous
1414
1405
t . matchSnapshot ( redactCwd ( result ) , 'should print tree and not duplicate child of missing items' )
1415
1406
t . end ( )
1416
1407
} )
@@ -1570,11 +1561,7 @@ t.test('ls --parseable', (t) => {
1570
1561
...simpleNmFixture ,
1571
1562
} )
1572
1563
ls . exec ( [ ] , ( err ) => {
1573
- t . match ( err . code , 'ELSPROBLEMS' , 'should have ELSPROBLEMS error code' )
1574
- t . matchSnapshot (
1575
- redactCwd ( err . message ) ,
1576
- 'should log all extraneous deps on error msg'
1577
- )
1564
+ t . error ( err ) // should not error for extraneous
1578
1565
t . matchSnapshot ( redactCwd ( result ) , 'should output parseable missing name/version of top-level package' )
1579
1566
t . end ( )
1580
1567
} )
@@ -1592,7 +1579,7 @@ t.test('ls --parseable', (t) => {
1592
1579
...simpleNmFixture ,
1593
1580
} )
1594
1581
ls . exec ( [ ] , ( err ) => {
1595
- t . equal ( err . code , 'ELSPROBLEMS' , ' should have error code' )
1582
+ t . error ( err ) // should not error for extraneous
1596
1583
t . matchSnapshot ( redactCwd ( result ) , 'should output containing problems info' )
1597
1584
t . end ( )
1598
1585
} )
@@ -1973,8 +1960,7 @@ t.test('ls --parseable', (t) => {
1973
1960
...simpleNmFixture ,
1974
1961
} )
1975
1962
ls . exec ( [ ] , ( err ) => {
1976
- t . equal ( err . code , 'ELSPROBLEMS' , 'should have error code' )
1977
- t . match ( redactCwd ( err . message ) , 'extraneous: [email protected] {CWD}/tap-testdir-ls-ls---parseable---long-with-extraneous-deps/node_modules/lorem' , 'should have error code' )
1963
+ t . error ( err ) // should not error for extraneous
1978
1964
t . matchSnapshot ( redactCwd ( result ) , 'should output long parseable output with extraneous info' )
1979
1965
t . end ( )
1980
1966
} )
@@ -2414,7 +2400,7 @@ t.test('ls --json', (t) => {
2414
2400
...simpleNmFixture ,
2415
2401
} )
2416
2402
ls . exec ( [ ] , ( err ) => {
2417
- t . match ( err , { code : 'ELSPROBLEMS' } , ' should list dep problems' )
2403
+ t . error ( err ) // should not error for extraneous
2418
2404
t . same (
2419
2405
jsonParse ( result ) ,
2420
2406
{
@@ -2470,16 +2456,7 @@ t.test('ls --json', (t) => {
2470
2456
...simpleNmFixture ,
2471
2457
} )
2472
2458
ls . exec ( [ ] , ( err ) => {
2473
- t . equal (
2474
- redactCwd ( err . message ) ,
2475
- 'extraneous: [email protected] {CWD}/tap-testdir-ls-ls---json-extraneous-deps/node_modules/lorem' ,
2476
- 'should log extraneous dep as error'
2477
- )
2478
- t . equal (
2479
- err . code ,
2480
- 'ELSPROBLEMS' ,
2481
- 'should have ELSPROBLEMS error code'
2482
- )
2459
+ t . error ( err ) // should not error for extraneous
2483
2460
t . same (
2484
2461
jsonParse ( result ) ,
2485
2462
{
0 commit comments