I am trying to have two separate instances of the same application running in a spectron test. For example:
var electronPath = path.join(__dirname, '..', 'node_modules', '.bin', 'electron');
if (process.platform === 'win32') {
electronPath += '.cmd';
}
var appPath = path.join(__dirname, "..", 'app/main/app.js');
appPath = "app/main/app.js";
console.log(appPath);
var app = new Application({
path: electronPath,
args: [appPath]
});
var app2 = new Application({
path: electronPath,
args: [appPath]
});
describe('Test Example', function () {
beforeEach(function () {
this.timeout(10000);
return app.start();
});
beforeEach(function () {
this.timeout(10000);
return app2.start();
});
})
I am a newbie and cannot find an answer. Can anybody help on this?