From 42b09b689413328fdc98bad9b11926ad203ce4dc Mon Sep 17 00:00:00 2001 From: Kiran Niranjan Date: Mon, 5 Jun 2017 22:25:34 +0530 Subject: [PATCH] Electron-66 (Unit Tests) (#125) * ELECTRON-66 - Fixed the target version * ELECTRON-66 - Fixed activity detection and config unit tests --- tests/activityDetection.test.js | 1 + tests/config.test.js | 18 ------------------ 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/tests/activityDetection.test.js b/tests/activityDetection.test.js index 578768c4..9b366384 100644 --- a/tests/activityDetection.test.js +++ b/tests/activityDetection.test.js @@ -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); diff --git a/tests/config.test.js b/tests/config.test.js index e4a7026f..d195ffa6 100644 --- a/tests/config.test.js +++ b/tests/config.test.js @@ -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;