@@ -30,11 +30,17 @@ describe('Cache: start_url audit', () => {
3030 } ) ;
3131
3232 it ( 'fails when no cache contents given' , ( ) => {
33- return assert . equal ( Audit . audit ( { Manifest : exampleManifest , URL } ) . rawValue , false ) ;
33+ const artifacts = { Manifest : exampleManifest , URL } ;
34+ const output = Audit . audit ( artifacts ) ;
35+ assert . equal ( output . rawValue , false ) ;
36+ assert . equal ( output . debugString , 'No cache or URL detected' ) ;
3437 } ) ;
3538
3639 it ( 'fails when no URL given' , ( ) => {
37- return assert . equal ( Audit . audit ( { Manifest : exampleManifest , CacheContents} ) . rawValue , false ) ;
40+ const artifacts = { Manifest : exampleManifest , CacheContents} ;
41+ const output = Audit . audit ( artifacts ) ;
42+ assert . equal ( output . rawValue , false ) ;
43+ assert . equal ( output . debugString , 'No cache or URL detected' ) ;
3844 } ) ;
3945
4046 // Need to disable camelcase check for dealing with start_url.
@@ -43,23 +49,18 @@ describe('Cache: start_url audit', () => {
4349 const artifacts = {
4450 Manifest : { }
4551 } ;
46- return assert . equal ( Audit . audit ( artifacts ) . rawValue , false ) ;
47- } ) ;
48-
49- it ( 'fails when a manifest artifact contains a null start_url' , ( ) => {
50- const artifacts = {
51- Manifest : {
52- start_url : null
53- }
54- } ;
55- return assert . equal ( Audit . audit ( artifacts ) . rawValue , false ) ;
52+ const output = Audit . audit ( artifacts ) ;
53+ assert . equal ( output . rawValue , false ) ;
54+ assert . equal ( output . debugString , 'start_url not present in Manifest' ) ;
5655 } ) ;
5756
5857 it ( 'fails when a manifest contains no start_url' , ( ) => {
5958 const artifacts = {
6059 Manifest : manifestParser ( '{}' )
6160 } ;
62- return assert . equal ( Audit . audit ( artifacts ) . rawValue , false ) ;
61+ const output = Audit . audit ( artifacts ) ;
62+ assert . equal ( output . rawValue , false ) ;
63+ assert . equal ( output . debugString , 'start_url not present in Manifest' ) ;
6364 } ) ;
6465 /* eslint-enable camelcase */
6566
0 commit comments