You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 1, 2021. It is now read-only.
A custom test runner for Jest that runs tests inside an electron main or renderer process providing the following benefits:
Main
all electron instance modules (ipc, app, etc)
Renderer
full access to a browser environment without the need for jsdom or similar modules
Getting Started
NOTE: for jest@23 use the older version ~@jest-runner/electron@0.2.2
Install jest electron runner yarn add @jest-runner/electron --dev
Add one of these lines to your jest config (in package.json or inside your jest.config.js file), depending on the process you wish to test. If you wish to test them in parallel, see the tips section below.
The main process runner can be used to test any non-browser related code, which can speed up tests roughly 2x.
To run the main and renderer process tests in parallel, you can provide a config object to the projects array in a jest javascript config file like so:
Facebook has adopted a Code of Conduct that we expect project participants to adhere to. Please read the full text so that you can understand what actions will and will not be tolerated.
Read our contributing guide to learn about our development process, how to propose bugfixes and improvements, and how to build and test your changes to Jest.