Skip to content

Commit

Permalink
Merge pull request mapbox#22 in ONE/jest-image-snapshot from fix/exam…
Browse files Browse the repository at this point in the history
…ples-are-not-runnable to master

* commit '0a0affd56b48c252bdfa38956edf87fdd750cd00':
  fix(examples): make runnable without requiring root package to be installed
  • Loading branch information
anescobar1991 committed May 18, 2018
2 parents 10f2fd6 + 0a0affd commit 1a20fa0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions examples/jest-setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
* the License.
*/

// outside of this repo use `require('jest-image-snapshot')` instead
const { toMatchImageSnapshot } = require('../src/');
// eslint runs from root and only looks at root package.json
// eslint-disable-next-line import/no-unresolved
const { toMatchImageSnapshot } = require('jest-image-snapshot');

expect.extend({ toMatchImageSnapshot });
5 changes: 3 additions & 2 deletions examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@
"author": "Andres Escobar <[email protected]> (https://github.com/anescobar1991)",
"license": "Apache-2.0",
"dependencies": {
"jest": "^22.0.0",
"puppeteer": "^0.13.0"
"jest": "*",
"jest-image-snapshot": "*",
"puppeteer": "*"
},
"jest": {
"setupTestFrameworkScriptFile": "<rootDir>/jest-setup.js"
Expand Down

0 comments on commit 1a20fa0

Please sign in to comment.