Closed tansaku closed 7 years ago
I've fixed this - it appears that the extra single quotes that did not cause a problem for command line starts, are not liked by the spectron set up.
I got things working using the following:
this.app = new Application({
path: electronPath,
args: ["--js-flags=--harmony", appPath, testFile],
webdriverLogPath: './webdriverlogs',
chromeDriverLogPath: './chromedriver.log'
});
I've got spectron running and I'm trying to pass in the js-flag
--harmony
:I can see from the logs that it seems to be passed in correctly, but for some reason I get errors in the app that correspond to those that I get when I leave off the harmony flag when I run it directly.
I've even tried hard-coding electron binary to take the harmony flag:
but I still get the same errors.
I wonder if I'm not understanding something about how chromedriver works. At the moment the only different I can see is that spectron is spawning a process from
launcher.js
that then spawns another process via the.bin/electron
command.I also note that I can't console log anything in launcher or electron when running via spectron.
I know it's a bit obscure, but any ideas much appreciated. Has anyone else had trouble passing a harmony flag to chromedriver/spectron?