use correct end hook for reporter
This commit is contained in:
parent
a4a13dbc71
commit
afcecc50ac
1 changed files with 2 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
const Mocha = require('mocha')
|
||||
const { EVENT_TEST_FAIL, EVENT_TEST_END } = Mocha.Runner.constants
|
||||
const { EVENT_TEST_FAIL, EVENT_RUN_END } = Mocha.Runner.constants
|
||||
|
||||
const path = require('path')
|
||||
const projectRoot = path.normalize(path.join(__dirname, '..'))
|
||||
|
@ -32,7 +32,7 @@ class TerseReporter {
|
|||
failuresPerFile[this.currentTest.file].push(this.currentTest)
|
||||
})
|
||||
|
||||
runner.on(EVENT_TEST_END, () => {
|
||||
runner.on(EVENT_RUN_END, () => {
|
||||
if (Object.keys(failuresPerFile).length === 0) return
|
||||
|
||||
const fs = require('fs')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue