Skip to content

Commit 072c02e

Browse files
committedDec 4, 2018
Support limited consoles in test/reporters.js.
1 parent f0e2f4e commit 072c02e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎test/reporters.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ describe('Reporter', () => {
683683
});
684684

685685
const { output } = await Lab.report(script, { reporter: 'console', progress: 0, output: false, assert: false });
686-
expect(output).to.match(/^\u001b\[32m1 tests complete\u001b\[0m\nTest duration: \d+ ms\n\u001b\[32mNo global variable leaks detected\u001b\[0m\n\n$/);
686+
expect(output).to.match(/^(\u001b\[32m)?1 tests complete(\u001b\[0m)?\nTest duration: \d+ ms\n(\u001b\[32m)?No global variable leaks detected(\u001b\[0m)?\n\n$/);
687687
});
688688

689689
it('generates a report with verbose progress', async () => {
@@ -695,7 +695,7 @@ describe('Reporter', () => {
695695
});
696696

697697
const { output } = await Lab.report(script, { reporter: 'console', progress: 2, output: false, assert: false });
698-
expect(output).to.match(/^test\n \u001b\[32m[]\u001b\[0m \u001b\[90m1\) works \(\d+ ms\)\u001b\[0m\n\n\n\u001b\[32m1 tests complete\u001b\[0m\nTest duration: \d+ ms\n\u001b\[32mNo global variable leaks detected\u001b\[0m\n\n$/);
698+
expect(output).to.match(/^test\n (\u001b\[32m)?[](\u001b\[0m)? (\u001b\[90m)?1\) works \(\d+ ms\)(\u001b\[0m)?\n\n\n(\u001b\[32m)?1 tests complete(\u001b\[0m)?\nTest duration: \d+ ms\n(\u001b\[32m)?No global variable leaks detected(\u001b\[0m)?\n\n$/);
699699
});
700700

701701
it('generates a report with verbose progress with experiments with same named tests', async () => {
@@ -763,7 +763,7 @@ describe('Reporter', () => {
763763
});
764764

765765
const { output } = await Lab.report(script, { reporter: 'console', progress: 2, assert: Code, output: false });
766-
expect(output).to.match(/^test\n \u001b\[32m[]\u001b\[0m \u001b\[90m1\) works \(\d+ ms and \d+ assertions\)\u001b\[0m\n\n\n\u001b\[32m1 tests complete\u001b\[0m\nTest duration: \d+ ms\nAssertions count\: \d+ \(verbosity\: \d+\.\d+\)\n\u001b\[32mNo global variable leaks detected\u001b\[0m\n\n$/);
766+
expect(output).to.match(/^test\n (\u001b\[32m)?[](\u001b\[0m)? (\u001b\[90m)?1\) works \(\d+ ms and \d+ assertions\)(\u001b\[0m)?\n\n\n(\u001b\[32m)?1 tests complete(\u001b\[0m)?\nTest duration: \d+ ms\nAssertions count\: \d+ \(verbosity\: \d+\.\d+\)\n(\u001b\[32m)?No global variable leaks detected(\u001b\[0m)?\n\n$/);
767767
});
768768

769769
it('generates a report with verbose progress that displays well on windows', async () => {

0 commit comments

Comments
 (0)
Please sign in to comment.