fix app path on windows (#580)

This commit is contained in:
VICTOR RAPHAEL BRAGA DE SALES MASCARENHAS 2019-03-11 11:25:34 -03:00 committed by Kiran Niranjan
parent 1bbe6486c5
commit e2dbf4087d

View File

@ -1,5 +1,6 @@
import { EventEmitter } from 'events';
import * as path from 'path';
import { isWindowsOS } from '../../src/common/env';
const ipcEmitter = new EventEmitter();
const mockIdleTime: number = 15;
@ -28,9 +29,12 @@ interface IPowerMonitor {
querySystemIdleTime(): void;
}
// use config provided by test framework
const pathToConfigDir = (): string => {
return path.join(__dirname, '/..') as string;
if (isWindowsOS) {
return path.join(__dirname, '/../..') as string;
} else {
return path.join(__dirname, '/..') as string;
}
};
// electron app mock...