1

我正在尝试在 Spectron 测试中运行同一应用程序的两个单独实例。例如:

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();
  });

})

我是新手,找不到答案。有人可以帮忙吗?

4

0 回答 0