Electron-66 (Unit Tests) (#125)

* ELECTRON-66 - Fixed the target version

* ELECTRON-66 - Fixed activity detection and config unit tests
This commit is contained in:
Kiran Niranjan
2017-06-05 09:55:34 -07:00
committed by Lynn
parent 3f9167b3d6
commit 42b09b6894
2 changed files with 1 additions and 18 deletions
+1
View File
@@ -28,6 +28,7 @@ describe('Tests for Activity Detection', function() {
});
it('should get user activity where user is not idle', function() {
activityDetection.setActivityWindow(120000, electron.ipcRenderer);
const data = activityDetection.activityDetection();
expect(data.isUserIdle).toBe(false);
-18
View File
@@ -257,24 +257,6 @@ describe('getConfigField tests', function() {
});
});
it('should throw error if config file is not correct', function() {
var userConfig = {
url: 'something'
};
createTempUserConfig(userConfig);
let correctConfigDir = userConfigDir;
userConfigDir = '//';
return saveUserConfig('url2', 'hello world', 'url')
.catch(function(err) {
userConfigDir = correctConfigDir;
expect(err).toBeTruthy();
});
});
it('should throw error if path is not defined for saveUserConfig()', function() {
userConfigDir = null;