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

[Bug]: collectCoverage is missing from JestConfigWithTsJest #3826

Closed
segevfiner opened this issue Sep 22, 2022 · 0 comments · Fixed by #3824
Closed

[Bug]: collectCoverage is missing from JestConfigWithTsJest #3826

segevfiner opened this issue Sep 22, 2022 · 0 comments · Fixed by #3824
Labels
🐛 Bug Confirmed Bug is confirmed

Comments

@segevfiner
Copy link

Version

29.0.1

Steps to reproduce

  1. Create a jest.config.ts that defines collectCoverage: true and type the object using JestConfigWithTsJest

Expected behavior

Type checking passes

Actual behavior

collectCoverage is missing from the type and will cause an error

Debug log

Not relevant.

Additional context

[{
	"resource": "/c:/Users/Segev/prj/axios-light-my-request-adapter/jest.config.ts",
	"owner": "typescript",
	"code": "2322",
	"severity": 8,
	"message": "Type '{ clearMocks: true; collectCoverage: boolean; coverageDirectory: string; coverageProvider: string; globals: { \"ts-jest\": { tsconfig: string; }; }; preset: string; transform: { \"^.+\\\\.tsx?$\": [\"ts-jest\", { ...; }]; }; }' is not assignable to type 'JestConfigWithTsJest'.\n  Object literal may only specify known properties, and 'collectCoverage' does not exist in type 'JestConfigWithTsJest'.",
	"source": "ts",
	"startLineNumber": 21,
	"startColumn": 3,
	"endLineNumber": 21,
	"endColumn": 24
}]

Environment

System:
    OS: Windows 10 10.0.19044
    CPU: (16) x64 11th Gen Intel(R) Core(TM) i9-11900H @ 2.50GHz
  Binaries:
    Node: 16.17.0 - ~\scoop\apps\nvm\current\nodejs\nodejs\node.EXE
    Yarn: 1.22.19 - ~\scoop\apps\nvm\current\nodejs\nodejs\yarn.CMD
    npm: 8.19.2 - ~\scoop\apps\nvm\current\nodejs\nodejs\npm.CMD
  npmPackages:
    jest: ^29.0.3 => 29.0.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Confirmed Bug is confirmed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants