Skip to content

rasmuserik/electron-testrunner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Electron Testrunner

Quick hack

Simple testrunner with browser environment. This recursively traverses(cycle-safe) all exported functions, and runs those called TEST_*. The exit code then depends on whether any of the functions threw an error. It also works for asynchrous tests, i.e. it waits for promises.

It depends on xvfb-run being installed, as it executes via electron, and is intended to run on travis-ci.

npm install --save-dev electron@1.6.3 electron-testrunner
node_modules/.bin/electron-testrunner file1ToTest.js file2ToTest.js

To run with npm run test, just add

{
  "scripts": {
     "test": "electron-testrunner filename.js"
  },
  "devDependencies": {
      "electron-testrunner": "^0.1.0",
  }
}

to package.json.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published