File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,13 +21,13 @@ class MyCustomReporter {
2121 const baseName = path . basename ( testFilePath , '.test.js' ) ;
2222 const reportDir = path . join ( __dirname , '../test-reports' ) ;
2323
24- const voidFilePath = path . join ( reportDir , `${ baseName } .void.log ` ) ;
24+ const voidFilePath = path . join ( reportDir , `${ baseName } .void.md ` ) ;
2525 await unlink ( voidFilePath ) ;
2626
27- const passFilePath = path . join ( reportDir , `${ baseName } .pass.log ` ) ;
27+ const passFilePath = path . join ( reportDir , `${ baseName } .pass.md ` ) ;
2828 await unlink ( passFilePath ) ;
2929
30- const failFilePath = path . join ( reportDir , `${ baseName } .fail.log ` ) ;
30+ const failFilePath = path . join ( reportDir , `${ baseName } .fail.md ` ) ;
3131 await unlink ( failFilePath ) ;
3232
3333 const failedTestResults = testResults . filter (
@@ -45,7 +45,7 @@ class MyCustomReporter {
4545 . map ( testResult => testResult . fullName )
4646 . join ( '\n' ) ;
4747 console . error ( report ) ;
48- await fs . writeFile ( failFilePath , report , 'utf8' ) ;
48+ await fs . writeFile ( failFilePath , '```\n' + report + '\n```' , 'utf8' ) ;
4949 }
5050 } ) ;
5151 }
Original file line number Diff line number Diff line change 1+ ```
2+ Generated HTML should contain a <ul> with 3 <li> elements
3+ Generated HTML should include an <li> with title and author for each book
4+ Generated HTML should include an <img> element for each book
5+ ```
You can’t perform that action at this time.
0 commit comments