1
0
Fork 0

fix(test): correctly check lines, remove empty alternative

This commit is contained in:
Sean Sube 2022-04-22 14:16:04 +00:00
parent 912eb82acc
commit 322de068f8
1 changed files with 8 additions and 2 deletions

View File

@ -29,9 +29,15 @@ describe('table reporter', () => {
const reporter = new TableReporter();
const report = await reporter.report(results);
for (const line of report.split('\n')) {
expect(line).to.match(/^|/);
const lines = report.split('\n');
const lastLine = lines.pop();
// eslint-disable-next-line no-console
console.log(lines.length, lines);
for (const line of lines) {
expect(line).to.match(/^[|]/);
}
expect(lastLine).to.equal('');
});
});