diff --git a/lib/constants/events.js b/lib/constants/events.js index 4c239dc8d..2471911cf 100644 --- a/lib/constants/events.js +++ b/lib/constants/events.js @@ -22,7 +22,6 @@ module.exports = { END_STATE: 'endState', INFO: 'info', - WARNING: 'warning', ERROR: 'err', // unable to call it `error` because `error` handling is a special case for EventEmitter TEST_RESULT: 'testResult', diff --git a/lib/reporters/flat-factory/flat.js b/lib/reporters/flat-factory/flat.js index 0f11523ac..f86380b9b 100644 --- a/lib/reporters/flat-factory/flat.js +++ b/lib/reporters/flat-factory/flat.js @@ -19,7 +19,6 @@ module.exports = class Flat { runner.on(Events.UPDATE_RESULT, this._onUpdateResult.bind(this)); runner.on(Events.RETRY, this._onRetry.bind(this)); runner.on(Events.ERROR, this._onError.bind(this)); - runner.on(Events.WARNING, this._onWarning.bind(this)); runner.on(Events.END, this._onEnd.bind(this)); runner.on(Events.INFO, this._onInfo.bind(this)); runner.on(Events.SKIP_STATE, this._onSkipState.bind(this)); @@ -57,13 +56,6 @@ module.exports = class Flat { this._logError(result); } - _onWarning(result) { - logger.log(`${ICON_WARN} ${this._formatStateInfo(result)}`); - logger.warn(result.message); - - this._counter.onSkipped(result); - } - _onSkipState(result) { const skipReason = result.suite.skipComment ? chalk.yellow('reason: ' + result.suite.skipComment) diff --git a/lib/runner/browser-runner/index.js b/lib/runner/browser-runner/index.js index cf36f08ae..3ba0975a5 100644 --- a/lib/runner/browser-runner/index.js +++ b/lib/runner/browser-runner/index.js @@ -64,7 +64,6 @@ module.exports = class BrowserRunner extends Runner { Events.END_STATE, Events.TEST_RESULT, Events.UPDATE_RESULT, - Events.WARNING, Events.ERROR, Events.RETRY ]); diff --git a/lib/runner/index.js b/lib/runner/index.js index 98a6a45b7..f3d678f73 100644 --- a/lib/runner/index.js +++ b/lib/runner/index.js @@ -83,7 +83,6 @@ module.exports = class TestsRunner extends Runner { Events.BEGIN_STATE, Events.END_STATE, Events.INFO, - Events.WARNING, Events.ERROR ]); diff --git a/lib/runner/suite-runner/insistent-suite-runner.js b/lib/runner/suite-runner/insistent-suite-runner.js index e65088268..53d2a65f4 100644 --- a/lib/runner/suite-runner/insistent-suite-runner.js +++ b/lib/runner/suite-runner/insistent-suite-runner.js @@ -39,8 +39,7 @@ module.exports = class InsistentSuiteRunner extends SuiteRunner { Events.BEGIN_STATE, Events.SKIP_STATE, Events.END_STATE, - Events.UPDATE_RESULT, - Events.WARNING + Events.UPDATE_RESULT ]); return runner; diff --git a/lib/runner/suite-runner/regular-suite-runner.js b/lib/runner/suite-runner/regular-suite-runner.js index a58469707..1da170c53 100644 --- a/lib/runner/suite-runner/regular-suite-runner.js +++ b/lib/runner/suite-runner/regular-suite-runner.js @@ -103,8 +103,7 @@ module.exports = class RegularSuiteRunner extends SuiteRunner { Events.BEGIN_STATE, Events.END_STATE, Events.TEST_RESULT, - Events.UPDATE_RESULT, - Events.WARNING + Events.UPDATE_RESULT ]); runner.on(Events.ERROR, (e) => { diff --git a/lib/stats.js b/lib/stats.js index 5e13fe69c..626b7fdd1 100644 --- a/lib/stats.js +++ b/lib/stats.js @@ -9,7 +9,6 @@ const STATS = { passed: 'passed', failed: 'failed', skipped: 'skipped', - warned: 'warned', retries: 'retries' }; @@ -25,7 +24,6 @@ module.exports = class Stats { attachRunner(runner) { runner .on(RunnerEvents.SKIP_STATE, (test) => this._addStat(STATS.skipped, test)) - .on(RunnerEvents.WARNING, (test) => this._addStat(STATS.warned, test)) .on(RunnerEvents.ERROR, (test) => this._addStat(STATS.failed, test)) .on(RunnerEvents.UPDATE_RESULT, (test) => { return test.updated ? this._addStat(STATS.updated, test) : this._addStat(STATS.passed, test); diff --git a/test/unit/gemini.js b/test/unit/gemini.js index a7e9bd8ce..749f1380c 100644 --- a/test/unit/gemini.js +++ b/test/unit/gemini.js @@ -92,7 +92,6 @@ describe('gemini', () => { Events.END_STATE, Events.INFO, - Events.WARNING, Events.ERROR, Events.TEST_RESULT, diff --git a/test/unit/runner/index.js b/test/unit/runner/index.js index fd5c66128..2d6cf27c9 100644 --- a/test/unit/runner/index.js +++ b/test/unit/runner/index.js @@ -467,7 +467,6 @@ describe('runner', () => { Events.BEGIN_STATE, Events.END_STATE, Events.INFO, - Events.WARNING, Events.ERROR ].forEach((event) => testPassthrough(event)); }); diff --git a/test/unit/runner/suite-runner/insistent-suite-runner.js b/test/unit/runner/suite-runner/insistent-suite-runner.js index 21b59ab61..e882ca925 100644 --- a/test/unit/runner/suite-runner/insistent-suite-runner.js +++ b/test/unit/runner/suite-runner/insistent-suite-runner.js @@ -65,8 +65,7 @@ describe('runner/suite-runner/insistent-suite-runner', () => { Events.SKIP_STATE, Events.END_STATE, Events.TEST_RESULT, - Events.UPDATE_RESULT, - Events.WARNING + Events.UPDATE_RESULT ].forEach((stateEvent) => it(`should passthrough ${stateEvent} state`, () => { stubWrappedRun_((runner) => runner.emit(stateEvent, {foo: 'bar'})); const handler = sinon.spy().named(stateEvent + 'Handler'); @@ -452,7 +451,6 @@ describe('runner/suite-runner/insistent-suite-runner', () => { Events.END_STATE, Events.UPDATE_RESULT, Events.TEST_RESULT, - Events.WARNING, Events.ERROR ].forEach((event) => { it(`${event}`, () => { diff --git a/test/unit/stats.js b/test/unit/stats.js index 7eb35558a..c7add021c 100644 --- a/test/unit/stats.js +++ b/test/unit/stats.js @@ -21,12 +21,6 @@ describe('Stats', () => { assert.equal(stats.getResult().skipped, 1); }); - it('should count warned tests', () => { - runner.emit(RunnerEvents.WARNING, makeStateResult()); - - assert.equal(stats.getResult().warned, 1); - }); - it('should count updated tests', () => { runner.emit(RunnerEvents.UPDATE_RESULT, makeStateResult({updated: true})); @@ -66,12 +60,6 @@ describe('Stats', () => { assert.equal(stats.getResult().passed, 1); }); - it('should count warned tests on "WARNING" event', () => { - runner.emit(RunnerEvents.WARNING, makeStateResult()); - - assert.equal(stats.getResult().warned, 1); - }); - it('should count total test count', () => { runner.emit(RunnerEvents.TEST_RESULT, makeStateResult({equal: false, name: 'first'})); runner.emit(RunnerEvents.TEST_RESULT, makeStateResult({equal: true, name: 'second'})); @@ -86,15 +74,13 @@ describe('Stats', () => { runner.emit(RunnerEvents.TEST_RESULT, makeStateResult({equal: false, name: 'failed'})); runner.emit(RunnerEvents.ERROR, makeStateResult({name: 'errored'})); runner.emit(RunnerEvents.SKIP_STATE, makeStateResult({name: 'skipped'})); - runner.emit(RunnerEvents.WARNING, makeStateResult({name: 'warned'})); assert.deepEqual(stats.getResult(), { - total: 6, + total: 5, updated: 1, passed: 1, failed: 2, skipped: 1, - warned: 1, retries: 1 }); });