@@ -260,6 +260,24 @@ t.test('audit disabled by config', async t => {
260
260
t . equal ( report . error , null , 'no error encountered' )
261
261
} )
262
262
263
+ t . test ( 'audit disabled by offline mode' , async t => {
264
+ const path = resolve ( fixtures , 'audit-nyc-mkdirp' )
265
+
266
+ const logs = [ ]
267
+ const onlog = ( ...msg ) => logs . push ( msg )
268
+ process . on ( 'log' , onlog )
269
+ t . teardown ( ( ) => process . removeListener ( 'log' , onlog ) )
270
+
271
+ const arb = newArb ( path , { offline : true } )
272
+
273
+ const tree = await arb . loadVirtual ( )
274
+ const report = await AuditReport . load ( tree , arb . options )
275
+ t . equal ( report . report , null , 'did not get audit response' )
276
+ t . equal ( report . size , 0 , 'did not find any vulnerabilities' )
277
+ t . match ( logs , [ ] , 'no logs of error' )
278
+ t . equal ( report . error , null , 'no error encountered' )
279
+ } )
280
+
263
281
t . test ( 'one vulnerability' , async t => {
264
282
const path = resolve ( fixtures , 'audit-one-vuln' )
265
283
const auditFile = resolve ( path , 'audit.json' )
0 commit comments