Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running into error - jest-html-reporter #48

Open
eduwass opened this issue May 19, 2022 · 0 comments
Open

Running into error - jest-html-reporter #48

eduwass opened this issue May 19, 2022 · 0 comments

Comments

@eduwass
Copy link

eduwass commented May 19, 2022

Also ran into this error:

➜  dhg_tw git:(master) ✗ npm run test

> test
> npm run -s test:axe

Error: Could not resolve a module for a custom reporter.
  Module name: ./node_modules/jest-html-reporter
    at /Users/eduwass/Sites/dhg/app/public/wp-content/themes/dhg_tw/node_modules/@wordpress/e2e-tests/node_modules/jest-config/build/normalize.js:567:15
    at Array.map (<anonymous>)
    at normalizeReporters (/Users/eduwass/Sites/dhg/app/public/wp-content/themes/dhg_tw/node_modules/@wordpress/e2e-tests/node_modules/jest-config/build/normalize.js:549:33)
    at normalize (/Users/eduwass/Sites/dhg/app/public/wp-content/themes/dhg_tw/node_modules/@wordpress/e2e-tests/node_modules/jest-config/build/normalize.js:642:5)
    at readConfig (/Users/eduwass/Sites/dhg/app/public/wp-content/themes/dhg_tw/node_modules/@wordpress/e2e-tests/node_modules/jest-config/build/index.js:220:68)
    at async readConfigs (/Users/eduwass/Sites/dhg/app/public/wp-content/themes/dhg_tw/node_modules/@wordpress/e2e-tests/node_modules/jest-config/build/index.js:401:26)
    at async runCLI (/Users/eduwass/Sites/dhg/app/public/wp-content/themes/dhg_tw/node_modules/@wordpress/e2e-tests/node_modules/@jest/core/build/cli/index.js:198:59)
    at async Object.run (/Users/eduwass/Sites/dhg/app/public/wp-content/themes/dhg_tw/node_modules/@wordpress/e2e-tests/node_modules/jest-cli/build/cli/index.js:173:37)

Fixed by adding the jest-html-reporter package to theme root, with:
npm install jest-html-reporter --save-dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant