From 69c7ba3ad36d4e10d5d0de453f54d246f4a00915 Mon Sep 17 00:00:00 2001 From: Yaroslav Admin Date: Wed, 29 Apr 2020 23:36:46 +0200 Subject: [PATCH] chore(test): add test for flush resultsBuffer on engine upgrade (#3487) --- test/e2e/reporting.feature | 26 ++++++++++++++++++++++++++ test/e2e/support/reporting/test.js | 9 +++++++++ 2 files changed, 35 insertions(+) create mode 100644 test/e2e/reporting.feature create mode 100644 test/e2e/support/reporting/test.js diff --git a/test/e2e/reporting.feature b/test/e2e/reporting.feature new file mode 100644 index 000000000..d3f130fa2 --- /dev/null +++ b/test/e2e/reporting.feature @@ -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 + """ diff --git a/test/e2e/support/reporting/test.js b/test/e2e/support/reporting/test.js new file mode 100644 index 000000000..4bfec4449 --- /dev/null +++ b/test/e2e/support/reporting/test.js @@ -0,0 +1,9 @@ +describe('Reporting order', () => { + it('sync test', () => { + // pass + }) + + it('async test', (done) => { + setTimeout(done, 200) + }) +})