ELECTRON-357 (#321)

- Skipping npm rebuild every time and only running it once.
- Changed the time-out to 60000ms
- Moved the require to global
- Added done fail in all the catch functions
- Removed unwanted require
This commit is contained in:
Keerthi Niranjan
2018-03-13 15:50:32 +05:30
committed by Vishwas Shashidhar
parent 191ca0c05e
commit 55e75cf5e5
15 changed files with 223 additions and 260 deletions

View File

@@ -1,19 +1,14 @@
const electron = require('./__mocks__/electron');
const childProcess = require('child_process');
let activityDetection;
const activityDetection = require('../js/activityDetection');
describe('Tests for Activity Detection', function() {
const originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL;
jasmine.DEFAULT_TIMEOUT_INTERVAL = 90000;
jasmine.DEFAULT_TIMEOUT_INTERVAL = 60000;
beforeAll(function(done) {
childProcess.exec(`npm rebuild --target=${process.version} --build-from-source`, function(err) {
activityDetection = require('../js/activityDetection');
activityDetection.setActivityWindow(900000, electron.ipcRenderer);
done();
});
activityDetection.setActivityWindow(900000, electron.ipcRenderer);
done();
});
beforeEach(function() {
@@ -64,4 +59,4 @@ describe('Tests for Activity Detection', function() {
});
});
});