Skip to content

Commit

Permalink
chore(test): add test for flush resultsBuffer on engine upgrade (#3487)
Browse files Browse the repository at this point in the history
  • Loading branch information
devoto13 authored Apr 29, 2020
1 parent dee09d8 commit 69c7ba3
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
26 changes: 26 additions & 0 deletions test/e2e/reporting.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Feature: Results reporting
In order to use Karma
As a person who wants to write great tests
I want to Karma to report test results in the same order as they are executed.

Scenario: Results appear as tests are executed
Given a configuration with:
"""
files = ['reporting/test.js'];
browsers = ['ChromeHeadlessNoSandbox'];
plugins = [
'karma-mocha',
'karma-mocha-reporter',
'karma-chrome-launcher'
];
frameworks = ['mocha']
reporters = ['mocha']
"""
When I start Karma
Then it passes with like:
"""
START:
Reporting order
✔ sync test
✔ async test
"""
9 changes: 9 additions & 0 deletions test/e2e/support/reporting/test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
describe('Reporting order', () => {
it('sync test', () => {
// pass
})

it('async test', (done) => {
setTimeout(done, 200)
})
})

0 comments on commit 69c7ba3

Please sign in to comment.