-
Notifications
You must be signed in to change notification settings - Fork 828
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add unit tests #27
Comments
https://github.com/electron/electron-api-demos/blob/master/tests/index.js is a pretty good Spectron example to start from. I tried AVA for a bit but it was quite slow to start up every time because it's doing so much transpilation. |
Thanks for the link @zeke – will be needed since I never used Spectron 😅 Yeah, AVA takes some time to start – but it's awesome 😌 cc @sindresorhus |
@zeke That should only be the first run. We cache everything. Unless you're using |
@sindresorhus sweet! I will give AVA another go. |
I would like to start working on this. Maybe I can start doing tests in chunks and make pull requests for them? |
Sounds amazing @hyalkaf 😄 You could write the first ones and then send a |
Any progress here ? 😄 Otherwise I would try to start on it. Is the decision on AVA now final or Spectron ? |
@fokusferit No progress. Feel free to take it on. AVA + Spectron. Example here: https://github.com/electron/spectron/blob/master/README.md#with-ava |
Has any progress been made on this yet? I'd like to start chunking away at this. |
That'd be fantastic @brodeynewman! There hasn't been any substantial progress on this, you can grab the latest version of Kap off |
Awesome. I will start on this today then. |
I would prefer AVA and Enzyme. See: https://github.com/avajs/ava/blob/master/docs/recipes/react.md Make sure you install |
Expect a PR for some tests soon 😄 |
@brodeynewman any progress on this? would love to be able to test changes in here |
Hi guys, I know a number of people have already tried to take on this PR. I've just added in a sample test to run and confirm that it is setup correctly. Thanks |
okay, So I got it setup in package.json and hooked it up to npm test. I get the following error:
So I opened up a new issue on spectron's repo |
never mind I understand my issue |
just wanted to send a quick update. Included screenshots into my PR |
opened up an issue with this repo electron-userland/spectron#439 still getting the same issue of having the test timeout when using ci |
been reviewing documents on spectron and ava to try and find the correct param I am missing to get this working on circleci. Since the no output for 10 minutes error means that the environment isn't being setup correctly. |
I am basing my previous statement from this article available on electronjs which talks about headless testing and mentions circleci https://electronjs.org/docs/tutorial/testing-on-headless-ci currently reading through circleci docs |
Hello, I have a question, could someone tell me if the circleci logs are saying anything? I understand that spectron has webdriverio as a wrapper so that should be enough to run it? |
Hey guys, So a docker image needs to be setup to replicate the environment so that these tests can be run. Basically tests can't be added until this is configured, that's why the timeouts have been happening. Here's an example of another github repo with working tests and their config.yml has a docker image setup for electron https://github.com/CityOfZion/neon-wallet/blob/dev/.circleci/config.yml Thanks guys |
I now have a better understanding of next steps. I'll get working on this and resubmit the pr |
I highly suggest creating a markdown table with what you intended to cover with the tests, that way we have a better idea of what exactly we aim to cover @dhuang612 🙏 Thank you for bringing this issue back to life! |
Hi, created PR #730 for this issue. |
added some more tests |
Been using your app and it is very simple. It would mean great deal to me to contribute to this project. I've seen some of the people already added some tests but I'd like to add some more. And for now I'm learning examples of AVA and Spectron. Hope I can add some tests soon. |
We need some tests:
The text was updated successfully, but these errors were encountered: