-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Closed
Labels
ExternalRelates to another program, environment, or user action which we cannot control.Relates to another program, environment, or user action which we cannot control.
Milestone
Description
Bug Report
π Search Terms
v4.8.4 was released yesterday, so I just looked at the last 24h issues and found none.
π Version & Regression Information
- This changed between versions
4.8.3and4.8.4
β― Playground Link
N/A.
π» Code
my-test.test.ts
describe('Hello, World!', () => {
it('should have correct value', () => {
expect("Hello, World!").toEqual('Hello, World!');
});
});Errors
TS2582: Cannot find name 'describe'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`.TS2582: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`.TS2304: Cannot find name 'expect'.Installed Types
{
"@types/jest": "29.0.0",
"@types/node": "18.7.0",
"@types/react": "^18.0.20",
"@types/react-dom": "^18.0.6",
"@types/testing-library__jest-dom": "^5.14.5"
}Typescript Config
tsconfig.base.js
{
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "Node",
"resolveJsonModule": true,
"allowUnreachableCode": false,
"lib": ["ESNext"],
"allowJs": false,
"checkJs": false,
"noEmit": false,
"noEmitOnError": true,
"declaration": true,
"emitDeclarationOnly": true,
"declarationMap": true,
"strict": true,
"noImplicitAny": true,
"strictNullChecks": true,
"esModuleInterop": false,
"forceConsistentCasingInFileNames": true,
"useDefineForClassFields": true,
"removeComments": false,
"allowSyntheticDefaultImports": true
}
}tsconfig.js
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"declarationDir": "./types"
},
"files": ["./src/index.ts"],
"include": ["./tsconfig.d.ts", "./src/jest.setup.ts", "**/*.test.ts"]
}π Actual behavior
describe, it and expect are not recognised even if Jest type definitions are installed.
Everything was working fine until v4.8.4, changing ^4.8.3 with 4.8.3 fixes the issue.
π Expected behavior
Jest types to be properly recognised.
lucasbeckps, kradical, arjndr, daelynj, azuken and 2 more
Metadata
Metadata
Assignees
Labels
ExternalRelates to another program, environment, or user action which we cannot control.Relates to another program, environment, or user action which we cannot control.