Comments (7)
Ah, alright. Thanks for the context =)
As a heads up, this is best suited for only testing the renderer portion of an electron
app (i.e. testing menus should be done via Electron and Selenium)
I wouldn't suggest using this for regular web apps. It's typically best to have the testing environment be as close to production as possible. This means the ideal scenario is using an actual browser (e.g. Chrome, Firefox), although both electron
and PhantomJS suffice.
One scenario where it would annoyingly fail would be accidentally relying on something Node.js based but something is different in the browser polyfill (e.g. Buffer
). One scenario where it would be nice is visual regression testing directly in the test suite (maybe using it as a secondary plugin, instead of exclusively).
from karma-electron.
We do require at least [email protected]
. I figured we wouldn't need to document/introduce that because people who are installing karma-electron
will typically only be using this plugin which means their karma
install would be fresh.
In addition to that, I would prefer to avoid peerDependencies
as they typically cause more headaches than solve any:
How about we add something to the README as a compromise?
from karma-electron.
On npm 3 this shouldn't be a problem anymore, given it doesn't install peerDependencies
automatically. Its purpose is simply to warn any consumer of the package that you need to install extra dependencies for it to work.
If you still are not comfortable in adding it as a peerDependencies
I would do as you suggest and add a notice in the README.
Thanks again!
from karma-electron.
Either way you decide to go, I can prepare a PR.
from karma-electron.
Ah, that's a good solution for npm@3
. Unfortunately, a lot of users (myself included) are still using npm@2
(my reason is this blocker issue hasn't bee resolved to my knowledge -- npm/npm#10119)
I think the README is the best solution. We should probably also list the version of Electron we have tested against.
I will take care of the README update -- I'm typically picky about what's said/where so I don't want to waste any of your time with back and forth. I will take care of that by the end of the weekend.
For my own reference, how were you using karma
before karma-electron
? (e.g. using PhantomJS but with a bundler)
from karma-electron.
Awesome, thanks!
I still use Karma with PhantomJS for my regular web projects. You can check how I set it up in Sagui a tool to build frontend projects.
My use-case with your library is to test an actual Electron app.
Would you suggest using it for regular web applications as well? And why?
from karma-electron.
This has been patched and released in 4.1.1
from karma-electron.
Related Issues (20)
- `electron` did show not nothing happen then HOT 1
- Can't import nodejs modules in an angular-cli project (Typescript) HOT 1
- Errors without stack traces coming from karma-electron? HOT 5
- running with ndb for debugging? HOT 2
- Unable to open Electron window using --show HOT 3
- Electron 5 nodeIntegration HOT 12
- Custom launcher `require` mechanism doesn't work HOT 4
- Module paths are messed up HOT 5
- Error: Karma plugin is meant to be used from within Angular CLI and will not work correctly outside of it HOT 1
- How to configure NODE_PATH for the Electron instance? HOT 24
- [feature] option like 'require', but for renderer processes. HOT 1
- Karma times out when using Electron 9 and client.useIframe = false HOT 20
- Non-context aware native modules in renderer will cause specs to error HOT 3
- [questions] Is Electron 12 supported? HOT 16
- electron V12.0.4---------require is not defined HOT 3
- ES Modules HOT 2
- "require is not defined" after update to karma-electron 7 / electron 12 HOT 12
- Regardless of the `browserWindowOptions.show` value, a window always opens. HOT 12
- sqlite3 stalls with nodeIntegration true contextIsolation false HOT 12
- Consider migrating this great work to @web/test-runner. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from karma-electron.