Examples of tests written to leverage electron-mocha
See original GitHub issueHello
It would be great if this project had an examples
folder containing 2 tests (one for the main process, one for a renderer process) for testing a fictional Electron demo app.
At the moment I’m a bit stuck in my tests, not knowing how to go further than just testing pure CommonJS modules, that is all what is not specific to Electron. Some things I would like to do:
- Test a renderer process HTML view
- Test a renderer process JavaScript
- Show a menu and activate a menu item
Thanks a lot
Issue Analytics
- State:
- Created 8 years ago
- Reactions:2
- Comments:10 (3 by maintainers)
Top Results From Across the Web
How do I use Mocha to test my custom module that requires ...
js (this is the spectron example code from their github page). I run it with the "mocha" command through a package.json script (npm...
Read more >Testing in Django (Part 1) – Best Practices and Examples
Examples. Setup; Testing Models; Testing Views; Testing Forms; Testing the API ... Testing helps you structure good code, find bugs, and write documentation ......
Read more >How to Test React Components in TypeScript | Pluralsight
There are several benefits to leveraging TypeScript when testing: Enables better refactoring of tests, improving long-term maintenance. Ensures ...
Read more >Node.js Unit Testing: Get Started Quickly With Examples
It's important to write unit tests in a way that tries all possible ... Fortunately, unit testing can be leveraged in this scenario....
Read more >Testing Python Applications with Pytest - Semaphore Tutorial
This tutorial will demonstrate how to write tests for Python code with pytest, and how to utilize it to cater for a wide...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have already read those https://github.com/jprichardson/electron-mocha/tree/master/test files, but they don’t answer to the questions:
Wouldn’t it better to leave this issue open until there are more meaningful examples?
I’m willing to provide (through a PR) the very simple Electron demo app and the 2 tests (for main and renderer) mentioned at the top if someone then provide me with guidance to craft meaningful tests. Are you interested?
As explained in details in #38 by @inukshuk, electron-mocha is just to run Mocha tests in Electron, not to test Electron apps.