@@ -90,54 +90,6 @@ t.test('normal audit', async t => {
90
90
t . matchSnapshot ( joinedOutput ( ) )
91
91
} )
92
92
93
- t . test ( 'fallback audit ' , async t => {
94
- const { npm, joinedOutput } = await loadMockNpm ( t , {
95
- prefixDir : tree ,
96
- } )
97
- const registry = new MockRegistry ( {
98
- tap : t ,
99
- registry : npm . config . get ( 'registry' ) ,
100
- } )
101
- const manifest = registry . manifest ( {
102
- name : 'test-dep-a' ,
103
- packuments : [ { version : '1.0.0' } , { version : '1.0.1' } ] ,
104
- } )
105
- await registry . package ( { manifest } )
106
- const advisory = registry . advisory ( {
107
- id : 100 ,
108
- module_name : 'test-dep-a' ,
109
- vulnerable_versions : '<1.0.1' ,
110
- findings : [ { version : '1.0.0' , paths : [ 'test-dep-a' ] } ] ,
111
- } )
112
- registry . nock
113
- . post ( '/-/npm/v1/security/advisories/bulk' ) . reply ( 404 )
114
- . post ( '/-/npm/v1/security/audits/quick' , body => {
115
- const unzipped = JSON . parse ( gunzip ( Buffer . from ( body , 'hex' ) ) )
116
- return t . match ( unzipped , {
117
- name : 'test-dep' ,
118
- version : '1.0.0' ,
119
- requires : { 'test-dep-a' : '*' } ,
120
- dependencies : { 'test-dep-a' : { version : '1.0.0' } } ,
121
- } )
122
- } ) . reply ( 200 , {
123
- actions : [ ] ,
124
- muted : [ ] ,
125
- advisories : {
126
- 100 : advisory ,
127
- } ,
128
- metadata : {
129
- vulnerabilities : { info : 0 , low : 0 , moderate : 0 , high : 1 , critical : 0 } ,
130
- dependencies : 1 ,
131
- devDependencies : 0 ,
132
- optionalDependencies : 0 ,
133
- totalDependencies : 1 ,
134
- } ,
135
- } )
136
- await npm . exec ( 'audit' , [ ] )
137
- t . ok ( process . exitCode , 'would have exited uncleanly' )
138
- t . matchSnapshot ( joinedOutput ( ) )
139
- } )
140
-
141
93
t . test ( 'json audit' , async t => {
142
94
const { npm, joinedOutput } = await loadMockNpm ( t , {
143
95
prefixDir : tree ,
0 commit comments