fix(test): correctly check lines, remove empty alternative
This commit is contained in:
parent
912eb82acc
commit
322de068f8
|
@ -29,9 +29,15 @@ describe('table reporter', () => {
|
||||||
const reporter = new TableReporter();
|
const reporter = new TableReporter();
|
||||||
const report = await reporter.report(results);
|
const report = await reporter.report(results);
|
||||||
|
|
||||||
for (const line of report.split('\n')) {
|
const lines = report.split('\n');
|
||||||
expect(line).to.match(/^|/);
|
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('');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue