cli-testing-library version: 3.0.1
- Testing Framework and version: vitest@3.1.1
Relevant code or config:
...
afterEach(() => {
...
What you did:
Ran type checking after upgrading to 3.0.1
What happened:
The afterEach cause the following issue:
error TS2722: Cannot invoke an object which is possibly 'undefined'.
Reproduction:
- Install and setup typescript, vitest and latest version of this lib
- Have a test with an afterEach
- Run type checking
For an easier time debugging it, make sure skipLibCheck is false as that shows the type conflicts that causes this issue.
If necessary I can provide a reproduction repo but avoiding it for now since it is hopefully decently self-explanatory
Problem description:
The new version of the lib has a global overwrite of the afterEach (and other) types here, introduced in this PR.
Suggested solution:
Not overriding the global test types. We have removed them in a patch on our end to get around this issue atm.
cli-testing-libraryversion: 3.0.1Relevant code or config:
What you did:
Ran type checking after upgrading to 3.0.1
What happened:
The afterEach cause the following issue:
error TS2722: Cannot invoke an object which is possibly 'undefined'.Reproduction:
For an easier time debugging it, make sure
skipLibCheckis false as that shows the type conflicts that causes this issue.If necessary I can provide a reproduction repo but avoiding it for now since it is hopefully decently self-explanatory
Problem description:
The new version of the lib has a global overwrite of the afterEach (and other) types here, introduced in this PR.
Suggested solution:
Not overriding the global test types. We have removed them in a patch on our end to get around this issue atm.