mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-12-27 17:31:36 -06:00
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:
parent
3f9167b3d6
commit
42b09b6894
@ -28,6 +28,7 @@ describe('Tests for Activity Detection', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should get user activity where user is not idle', function() {
|
it('should get user activity where user is not idle', function() {
|
||||||
|
activityDetection.setActivityWindow(120000, electron.ipcRenderer);
|
||||||
const data = activityDetection.activityDetection();
|
const data = activityDetection.activityDetection();
|
||||||
|
|
||||||
expect(data.isUserIdle).toBe(false);
|
expect(data.isUserIdle).toBe(false);
|
||||||
|
@ -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() {
|
it('should throw error if path is not defined for saveUserConfig()', function() {
|
||||||
|
|
||||||
userConfigDir = null;
|
userConfigDir = null;
|
||||||
|
Loading…
Reference in New Issue
Block a user