itereshchenkov / jest-teamcity

Jest Teamcity Reporter
MIT License
31 stars 13 forks source link

Plugin doesn't work at all with configuration added to package.json #19

Closed mm-dsibinski closed 2 years ago

mm-dsibinski commented 3 years ago

Environment: Windows 10 jest-teamcity version: 1.9.0 TeamCity version: TeamCity Professional 2020.2.4 (build 86063)

Issue: I installed the npm package, added this to my package.json:

"jest": {
        "reporters": ["default", "jest-teamcity"]
    }

and I use the npm test command defined as "test": "jest" in package.json to run my tests. The result on TeamCity server is standard text output, the same like without the plugin. The tests are also not included in TeamCity's tests results.

I also tried to set the environment variable in Windows TEAMCITY_VERSION (both as system variable and user variable), but when I execute npm test locally with this variable defined the output is still standard, not the TeamCity one.

Solution: I found out that adding this configuration to package.json doesn't work anymore. It only worked for me when I added the configuration to jest's configuration file.

I issued a PR with the documentation update: https://github.com/itereshchenkov/jest-teamcity/pull/20

itereshchenkov commented 2 years ago

Thanks for updating documentation 👍 It's weird that it's not working with jest configuration at package.json. But might be some jest-specific issue.