Skip to content
This repository has been archived by the owner on Sep 21, 2022. It is now read-only.

Commit

Permalink
feat: remove deprecated CAPTURE event
Browse files Browse the repository at this point in the history
  • Loading branch information
j0tunn committed Nov 2, 2017
1 parent 9c7c8e2 commit d06a913
Show file tree
Hide file tree
Showing 9 changed files with 1 addition and 13 deletions.
2 changes: 0 additions & 2 deletions lib/constants/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ module.exports = {
WARNING: 'warning',
ERROR: 'err', // unable to call it `error` because `error` handling is a special case for EventEmitter

CAPTURE: 'capture', // Deprecated, will be removed in the next major version - 5.0.0

TEST_RESULT: 'testResult',
UPDATE_RESULT: 'updateResult',

Expand Down
1 change: 0 additions & 1 deletion lib/runner/browser-runner/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ module.exports = class BrowserRunner extends Runner {
Events.BEGIN_STATE,
Events.END_STATE,
Events.TEST_RESULT,
Events.CAPTURE,
Events.UPDATE_RESULT,
Events.WARNING,
Events.ERROR,
Expand Down
1 change: 0 additions & 1 deletion lib/runner/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ module.exports = class TestsRunner extends Runner {

runner.on(Events.END_SUITE, (data) => this._suiteMonitor.suiteFinished(data.suite, data.browserId));

runner.on(Events.CAPTURE, (result) => this._handleResult(result, Events.CAPTURE));
runner.on(Events.TEST_RESULT, (result) => this._handleResult(result, Events.TEST_RESULT));
runner.on(Events.UPDATE_RESULT, (result) => this._handleResult(result, Events.UPDATE_RESULT));

Expand Down
1 change: 0 additions & 1 deletion lib/runner/suite-runner/insistent-suite-runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ module.exports = class InsistentSuiteRunner extends SuiteRunner {
Events.BEGIN_STATE,
Events.SKIP_STATE,
Events.END_STATE,
Events.CAPTURE,
Events.UPDATE_RESULT,
Events.WARNING
]);
Expand Down
1 change: 0 additions & 1 deletion lib/runner/suite-runner/regular-suite-runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ module.exports = class RegularSuiteRunner extends SuiteRunner {
Events.BEGIN_STATE,
Events.END_STATE,
Events.TEST_RESULT,
Events.CAPTURE,
Events.UPDATE_RESULT,
Events.WARNING
]);
Expand Down
1 change: 0 additions & 1 deletion lib/state-processor/update-state-processor.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ module.exports = class UpdateStateProcessor extends StateProcessor {
exec(state, browserSession, page, emit) {
return super.exec(state, browserSession, page)
.then((result) => {
emit(Events.CAPTURE, result);
emit(Events.UPDATE_RESULT, result);
});
}
Expand Down
2 changes: 0 additions & 2 deletions test/unit/gemini.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@ describe('gemini', () => {
Events.WARNING,
Events.ERROR,

Events.CAPTURE,

Events.TEST_RESULT,
Events.UPDATE_RESULT
].forEach((event) => {
Expand Down
1 change: 0 additions & 1 deletion test/unit/runner/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,6 @@ describe('runner', () => {
});

[
Events.CAPTURE,
Events.TEST_RESULT,
Events.UPDATE_RESULT
].forEach((event) => {
Expand Down
4 changes: 1 addition & 3 deletions test/unit/runner/suite-runner/insistent-suite-runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ describe('runner/suite-runner/insistent-suite-runner', () => {
Events.SKIP_STATE,
Events.END_STATE,
Events.TEST_RESULT,
Events.CAPTURE,
Events.UPDATE_RESULT,
Events.WARNING
].forEach((stateEvent) => it(`should passthrough ${stateEvent} state`, () => {
Expand Down Expand Up @@ -454,8 +453,7 @@ describe('runner/suite-runner/insistent-suite-runner', () => {
Events.UPDATE_RESULT,
Events.TEST_RESULT,
Events.WARNING,
Events.ERROR,
Events.CAPTURE
Events.ERROR
].forEach((event) => {
it(`${event}`, () => {
const config = mkConfigStub_({retry: 0});
Expand Down

0 comments on commit d06a913

Please sign in to comment.