Skip to content

Commit ebe1f77

Browse files
committed
chore(test): add test for flush resultsBuffer on engine upgrade
1 parent 045956c commit ebe1f77

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

test/e2e/reporting.feature

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Feature: Results reporting
2+
In order to use Karma
3+
As a person who wants to write great tests
4+
I want to Karma to report test results in the same order as they are executed.
5+
6+
Scenario: Results appear as tests are executed
7+
Given a configuration with:
8+
"""
9+
files = ['reporting/test.js'];
10+
browsers = ['ChromeHeadlessNoSandbox'];
11+
plugins = [
12+
'karma-mocha',
13+
'karma-mocha-reporter',
14+
'karma-chrome-launcher'
15+
];
16+
frameworks = ['mocha']
17+
reporters = ['mocha']
18+
"""
19+
When I start Karma
20+
Then it passes with like:
21+
"""
22+
START:
23+
Reporting order
24+
✔ sync test
25+
✔ async test
26+
"""

test/e2e/support/reporting/test.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
describe('Reporting order', () => {
2+
it('sync test', () => {
3+
// pass
4+
})
5+
6+
it('async test', (done) => {
7+
setTimeout(done, 200)
8+
})
9+
})

0 commit comments

Comments
 (0)