vscode-testcafe icon indicating copy to clipboard operation
vscode-testcafe copied to clipboard

Unable to run all tests in project

Open svego opened this issue 6 years ago • 1 comments

When i use the option 'Run Test(s) in Chrome' on my project directory the testcafe test fails with the following error:

PS C:\Source\mytestdir> cd 'c:\Source\mytestdir'; & 'C:\Program Files\nodejs\node.exe' '--no-deprecation' '--inspect-brk=17323' 'node_modules\testcafe\lib\cli\index.js' 'chrome' 'c:\Source\mytestdir' Debugger listening on ws://127.0.0.1:17323/a4fc9578-5127-47ff-aa14-2f0348b046e8 For help, see: https://nodejs.org/en/docs/inspector Debugger attached. The "src", "browsers" options from the configuration file will be ignored. ERROR TypeError: this.precompile is not a function or its return value is not iterable at TypeScriptTestFileCompiler.compile (C:\Source\mytestdir\node_modules\testcafe\src\compiler\test-file\api-based.js:177:37) at Compiler._getTests (C:\Source\mytestdir\node_modules\testcafe\src\compiler\index.js:87:31) at Compiler._compileTestFiles (C:\Source\mytestdir\node_modules\testcafe\src\compiler\index.js:99:35)

Type "testcafe -h" for help. Waiting for the debugger to disconnect...

When i manually run the same command but remove the directory specification (so use testcaferc.jsin option) all my tests run normally. The command that works is this: 'C:\Program Files\nodejs\node.exe' '--no-deprecation' '--inspect-brk=17323' 'node_modules\testcafe\lib\cli\index.js' 'chrome'

As a workaround, is it possible to change the behaviour of the command that is used to run my tests?

svego avatar Jul 05 '19 09:07 svego

Hello @svego, could you please specify your TestCafe version? Have you tried to run the full command manually? Also, it will be very helpful if you can provide a sample project that can be used to reproduce the issue.

AndreyBelym avatar Jul 05 '19 09:07 AndreyBelym