Socket
Socket
Sign inDemoInstall

jest-electron

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-electron

Easiest way to run jest unit test cases in electron.


Version published
Weekly downloads
693
decreased by-27.59%
Maintainers
1
Weekly downloads
 
Created
Source

jest-electron

Easiest way to run jest unit test cases in electron.

Build Status npm npm

Usage

  • Install
npm i --save-dev jest-electron
  • Add to Jest config

In your package.json

{
  "jest": {
+    "runner": "jest-electron/runner",
+    "testEnvironment": "jest-electron/environment"
  }
}

Notice: update the runner configure, not testRunner.

  • Update .travis.yml
language: node_js
node_js:
  - "8"
  - "9"
  - "10"
  - "11"
  - "12"
+ addons:
+   apt:
+     packages:
+       - xvfb
+ install:
+   - export DISPLAY=':99.0'
+   - Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
+   - npm install
script:
  - npm run test

Debugger mode

Keep the electron browser window for debugging. set env DEBUG_MODE=1.

DEBUG_MODE=1 jest

License

MIT@hustcc.

FAQs

Package last updated on 18 Sep 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc