Skip to content

Commit 345c065

Browse files
committed
Revert back to .md
1 parent 8d5042a commit 345c065

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

test-helpers/CustomReporter.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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
}

test-reports/ex1-bookList.fail.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
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+
```

0 commit comments

Comments
 (0)