karma-electron-launcher icon indicating copy to clipboard operation
karma-electron-launcher copied to clipboard

misleading repo title (?)

Open fsiliadin opened this issue 7 years ago • 2 comments

Hello, the title of this repo is karma-electron-launcher but it also talk about browser. It is as it means by "Electron" that this environment exposes both chromium and node api? Or this repo is just an equivalent of Chromium? Which seems to be the case since 'require' is not recognized

fsiliadin avatar Apr 16 '19 12:04 fsiliadin

@fsiliadin This launches your tests in an Electron instance. It means, your tests will run in an environment just like an Electron app. If you don't see require, maybe you need to make sure that Electron Node Integration is enabled?

In general, your expectation is correct: you should be able to run your tests and have both Node APIs (like require and builtin Node.js modules like fs) and browser APIs (like WebGL, Canvas, etc).

trusktr avatar Mar 07 '20 18:03 trusktr

Also an alternative to this one is https://github.com/twolfson/karma-electron, which is more recently updated, and @twolfson has been very responsive there.

trusktr avatar Mar 07 '20 18:03 trusktr