-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
π Replace dots-style test reporters with the default
Spec
reporter (#β¦
- Loading branch information
1 parent
57d09a2
commit ecf5bcc
Showing
6 changed files
with
16 additions
and
371 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,18 @@ | ||
const {reporters} = require('mocha'); | ||
const JsonReporter = require('./mocha-custom-json-reporter'); | ||
const mocha = require('mocha'); | ||
const MochaDotsReporter = require('./mocha-dots-reporter'); | ||
const MochaJUnitReporter = require('mocha-junit-reporter'); | ||
const {Base} = mocha.reporters; | ||
|
||
/** | ||
* @param {*} runner | ||
* @param {*} options | ||
* @return {MochaDotsReporter} | ||
*/ | ||
function ciReporter(runner, options) { | ||
Base.call(this, runner, options); | ||
this._mochaDotsReporter = new MochaDotsReporter(runner); | ||
this._jsonReporter = new JsonReporter(runner); | ||
this._mochaJunitReporter = new MochaJUnitReporter(runner, options); | ||
// TODO(#28387) clean up this typing. | ||
return /** @type {*} */ (this); | ||
class CiReporter extends reporters.Base { | ||
/** | ||
* @param {import('mocha').Runner} runner | ||
* @param {import('mocha').MochaOptions} options | ||
*/ | ||
constructor(runner, options) { | ||
super(runner, options); | ||
this._mochaSpecReporter = new reporters.Spec(runner); | ||
this._jsonReporter = new JsonReporter(runner); | ||
this._mochaJunitReporter = new MochaJUnitReporter(runner, options); | ||
} | ||
} | ||
ciReporter.prototype.__proto__ = Base.prototype; | ||
|
||
module.exports = ciReporter; | ||
module.exports = CiReporter; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.