Skip to content

Commit

Permalink
hotfix: remove SIGINT, SIGTERM handling due to #881
Browse files Browse the repository at this point in the history
  • Loading branch information
noomorph committed Aug 13, 2018
1 parent 6d4698e commit b106925
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 29 deletions.
5 changes: 0 additions & 5 deletions detox/src/Detox.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,6 @@ class Detox {
}
}

async terminate() {
await this.artifactsManager.onTerminate();
await this.cleanup();
}

async beforeEach(testSummary) {
this._validateTestSummary(testSummary);
this._logTestRunCheckpoint('DETOX_BEFORE_EACH', testSummary);
Expand Down
10 changes: 0 additions & 10 deletions detox/src/Detox.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,15 +243,5 @@ describe('Detox', () => {
await detox.cleanup();
expect(detox.artifactsManager.onAfterAll).toHaveBeenCalledTimes(1);
});

it(`Calling .terminate() will trigger artifacts manager .onTerminate()`, async () => {
Detox = require('./Detox');

detox = new Detox({deviceConfig: validDeviceConfig});
detox.artifactsManager.onTerminate = jest.fn();

await detox.terminate();
expect(detox.artifactsManager.onTerminate).toHaveBeenCalledTimes(1);
});
});
});
4 changes: 0 additions & 4 deletions detox/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const platform = require('./platform');
const exportWrapper = require('./exportWrapper');
const argparse = require('./utils/argparse');
const log = require('./utils/logger').child({ __filename });
const onTerminate = require('./utils/onTerminate');
const configuration = require('./configuration');

let detox;
Expand Down Expand Up @@ -85,9 +84,6 @@ async function cleanup() {
}
}

/* istanbul ignore next */
onTerminate(() => detox && detox.terminate());

module.exports = Object.assign({
init,
cleanup,
Expand Down
2 changes: 0 additions & 2 deletions detox/src/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ describe('index', () => {
jest
.mock('./server/DetoxServer')
.mock('./devices/Device')
.mock('./utils/onTerminate')
.mock('./utils/logger')
.mock('./client/Client')
.mock('./Detox', () => jest.fn(() => mockDetox))
Expand All @@ -29,7 +28,6 @@ describe('index', () => {
jest
.unmock('./server/DetoxServer')
.unmock('./devices/Device')
.unmock('./utils/onTerminate')
.unmock('./client/Client')
.unmock('./Detox')
.unmock('./platform');
Expand Down
8 changes: 0 additions & 8 deletions detox/src/utils/onTerminate.js

This file was deleted.

0 comments on commit b106925

Please sign in to comment.