Skip to content

Commit

Permalink
test: run browser script tests in headless Chrome
Browse files Browse the repository at this point in the history
The tests for the browser scripts were previously run in a virtual
DOM (within Jest’s JDOM environment). This commit introduces a new
Jest environment (and companion utils) to run tests in a full browser
environment (headless Chrome, driven by Puppeteer).

Jest’s mock facility is available in the browser context through the
`window.mock` object.
  • Loading branch information
rdeltour committed Oct 28, 2017
1 parent 708a803 commit 85bc677
Show file tree
Hide file tree
Showing 5 changed files with 413 additions and 329 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
"eslint": "^3.19.0",
"eslint-config-airbnb-base": "^11.2.0",
"eslint-plugin-import": "^2.3.0",
"jest": "^21.1.0",
"jest": "21.3.0-beta.3",
"rimraf": "^2.6.1",
"standard-version": "^4.2.0",
"uglify-js": "^3.0.8",
Expand Down
Loading

0 comments on commit 85bc677

Please sign in to comment.