Prior99 / jest-screenshot

A jest extension to deal with screenshots and all sorts of images.
MIT License
71 stars 21 forks source link

Sample does not work #13

Closed Chartieer closed 5 years ago

Chartieer commented 5 years ago

Not able too run the example

Prior99 commented 5 years ago

The example tests are supposed to fail in order to show off the generated report. Can you elaborate on the problems you're encountering?

Chartieer commented 5 years ago

it´s not failing it´s not even running. Try npm i && npm test || yarn && yarn test

Prior99 commented 5 years ago

Please give me more context. Which node version? What operating system? Is it a clean installation? What is the output of the command?

On my two local machines as well as on the CI it is working.

Chartieer commented 5 years ago

Which node version? -tested with 8-10 nvm What operating system? mac Is it a clean installation? yep What is the output of the command?

yarn install yarn install v1.12.1 warning package.json: No license field warning jest-screenshot-example: No license field [1/4] 🔍 Resolving packages... [2/4] 🚚 Fetching packages... [3/4] 🔗 Linking dependencies... warning " > babel-jest@22.4.3" has unmet peer dependency "babel-core@^6.0.0 || ^7.0.0-0". [4/4] 📃 Building fresh packages... [1/4] ⠐ fsevents [2/4] ⠐ native-image-diff [3/4] ⠐ node-libpng error /Users/***/Downloads/jest-screenshot-master 3/example/node_modules/node-libpng: Command failed.

then Error: An error occurred while adding the reporter at path "/Users/***/Downloads/jest-screensho t-master 3/example/node_modules/jest-screenshot/reporter.js".Cannot find module './dist/reporter.js' at customReporters.forEach (/Users/***/Downloads/jest-screenshot-master 3/example/node_modules/jest-cli/build/test_scheduler.js:270:15) at Array.forEach (<anonymous>) at TestScheduler._addCustomReporters (/Users/***/Downloads/jest-screenshot-master 3/example/node_modules/jest-cli/build/test_scheduler.js:262:21) at TestScheduler._setupReporters (/Users/***/Downloads/jest-screenshot-master 3/example/node_modules/jest-cli/build/test_scheduler.js:243:12) at new TestScheduler (/Users/***/Downloads/jest-screenshot-master 3/example/node_modules/jest-cli/build/test_scheduler.js:50:10) at /Users/***/Downloads/jest-screenshot-master 3/example/node_modules/jest-cli/build/run_jest.js:149:27 at Generator.next (<anonymous>) at step (/Users/***/Downloads/jest-screenshot-master 3/example/node_modules/jest-cli/build/run_jest.js:23:380) at /Users/***/Downloads/jest-screenshot-master 3/example/node_modules/jest-cli/build/run_jest.js:23:540 at process._tickCallback (internal/process/next_tick.js:68:7)

Prior99 commented 5 years ago

You need to run yarn build and yarn webpack in the root project. Or use the Makefile.

Chartieer commented 5 years ago

Maybe you optimize the README and the package.json in the example project folder? while build and webpack are not existing commands by default, you might use a postinstall Hook?

Prior99 commented 5 years ago

Thanks for you recommendation. I will update the Readme.