From 0a0affd56b48c252bdfa38956edf87fdd750cd00 Mon Sep 17 00:00:00 2001 From: Andres Escobar Date: Fri, 18 May 2018 09:44:30 -0700 Subject: [PATCH] fix(examples): make runnable without requiring root package to be installed --- examples/jest-setup.js | 5 +++-- examples/package.json | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/examples/jest-setup.js b/examples/jest-setup.js index 537f38d..fe2a294 100644 --- a/examples/jest-setup.js +++ b/examples/jest-setup.js @@ -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 }); diff --git a/examples/package.json b/examples/package.json index 50b1bad..f0fd5f5 100644 --- a/examples/package.json +++ b/examples/package.json @@ -16,8 +16,9 @@ "author": "Andres Escobar (https://github.com/anescobar1991)", "license": "Apache-2.0", "dependencies": { - "jest": "^22.0.0", - "puppeteer": "^0.13.0" + "jest": "*", + "jest-image-snapshot": "*", + "puppeteer": "*" }, "jest": { "setupTestFrameworkScriptFile": "/jest-setup.js"