Closed ma7moudat closed 2 years ago
Hi @ma7moudat,
Please share your full project or at least full configs: package.json
, tsconfig.json
, and .testcaferc.json
(if it exists).
Hi @Aleksey28, I added the config files to the issue description above.
I found the cause of this problem. It takes place because the TS
version 3.*
is installed in Testcafe
by default. We already have a PR with an updated TS
. So, you have three options:
@types/jest
, e.g. 28.1.2
I guess I have found a workaround!
This is an excempt of my dev dependencies:
...
"@types/jest": "^28.1.6",
...
"testcafe": "^1.20.0",
I have created a new tsconfig tsconfig.testcafe.json
:
{
"compilerOptions": {
"types": []
}
}
This config ignores all types on compilation.
And I have configured my testcafe configuration to pick it up .testcaferc.json
:
{
"browsers": "chrome:headless",
"src": ["**/*.comp-spec.ts"],
"compilerOptions": {
"typescript": {
"configPath": "tsconfig.testcafe.json"
}
}
}
I am not sure if this has any side effects as the codebase I am actually working is quite small, but my tests are running fine.
Hi @jaedle,
Thank you for your investigation. You wrote detailed instructions for the third option described in https://github.com/DevExpress/testcafe/issues/7137#issuecomment-1181783159. Also, you and other people can use other workarounds from this comment.
Release v2.0.0-rc.1 addresses this.
Release v2.0.0-rc.1 addresses this.
What is your Scenario?
Angular Project using
PS 2e2 tests should be in a separate project, I know 😅 found the project like this and haven't gotten the time to split it so far
What is the Current behavior?
When our dependency manager updates to jest v28.1.2 and @types/jest v28.1.4 the e2e-tests break with the following error:
This issue was originally reported in https://github.com/DevExpress/testcafe/issues/4435 and https://github.com/DevExpress/testcafe/issues/4405 and it has been fixed before. Now it re-emerged with the new versions of jest and @types/jest.
IMPORTANT: The workaround of setting "customCompilerModulePath" worked for us.
What is the Expected behavior?
e2e-tests should run.
What is your public website URL? (or attach your complete example)
None.
What is your TestCafe test code?
Too big and irrelevant since it was working before the update.
Your complete configuration file
package.json
tsconfig.json
.testcaferc.json with the customCompilerModulePath workaround
Your complete test report
No response
Screenshots
No response
Steps to Reproduce
See "What is your Scenario?"
TestCafe version
1.19.0
Node.js version
17.1.0
Command-line arguments
testcafe chrome -f "..."
Browser name(s) and version(s)
No response
Platform(s) and version(s)
No response
Other
The workaround of setting "customCompilerModulePath" worked for us.