Skip to content

Running into error - jest-html-reporter #48

@eduwass

Description

@eduwass

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions