Skip to content

[Bug]: Github actions repoter throwing error #12830

Closed
@param-finder

Description

@param-finder

Version

^26.6.3

Steps to reproduce

Add reporters: ['default', 'github-actions'], in the jest.config file and run the tests.

Expected behavior

It should pass the test command

Actual behavior

$ jest
Error: Could not resolve a module for a custom reporter.
Module name: github-actions
at /Users/parmindersingh/Documents/FinderUK/node_modules/jest-config/build/normalize.js:558:15
at Array.map ()
at normalizeReporters (/Users/parmindersingh/Documents/FinderUK/node_modules/jest-config/build/normalize.js:540:33)
at normalize (/Users/parmindersingh/Documents/FinderUK/node_modules/jest-config/build/normalize.js:633:5)
at readConfig (/Users/parmindersingh/Documents/FinderUK/node_modules/jest-config/build/index.js:224:68)
at async readConfigs (/Users/parmindersingh/Documents/FinderUK/node_modules/jest-config/build/index.js:406:26)
at async runCLI (/Users/parmindersingh/Documents/FinderUK/node_modules/@jest/core/build/cli/index.js:230:59)
at async Object.run (/Users/parmindersingh/Documents/FinderUK/node_modules/jest-cli/build/cli/index.js:163:37)
error Command failed with exit code 1.

Additional context

I'm following the jest docs and its mentioned there as, I assume there's no need to install explicitly a custom reporter for this. If so, what's the official package name?

GitHub Actions Reporter
If included in the list, the built-in GitHub Actions Reporter will annotate changed files with test failure messages:

{
"reporters": ["default", "github-actions"]
}

Environment

System:
    OS: macOS 12.3.1
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
  Binaries:
    Node: 14.18.1 - /usr/local/bin/node
    Yarn: 1.22.17 - /usr/local/bin/yarn
    npm: 6.14.15 - /usr/local/bin/npm
  npmPackages:
    jest: ^26.6.3 => 26.6.3

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions