DevExpress / testcafe-examples

Ready-to-run examples for TestCafe
https://testcafe.io
MIT License
50 stars 53 forks source link

ERROR TypeError: Cannot read properties of undefined (reading 'forEach') upon "npm test" #70

Closed shansean closed 2 years ago

shansean commented 2 years ago

I just cloned the repo and followed the instructions in the Readme, but when i run "npm test" the testcafe client runs briefly before logging this error in the console.

TypeError: Cannot read properties of undefined (reading 'forEach') at DevToolsTestFileCompiler._preProcess (/Users/myUser/Documents/source/testcafe-examples/node_modules/testcafe/src/compiler/test-file/formats/dev-tools/compiler.ts:59:26) at DevToolsTestFileCompiler.compile (/Users/myUser/Documents/source/testcafe-examples/node_modules/testcafe/src/compiler/test-file/formats/dev-tools/compiler.ts:50:35) at Compiler._getTests (/Users/myUser/Documents/source/testcafe-examples/node_modules/testcafe/src/compiler/index.js:92:31) at Compiler._compileTestFiles (/Users/myUser/Documents/source/testcafe-examples/node_modules/testcafe/src/compiler/index.js:104:35) at Compiler.getTests (/Users/myUser/Documents/source/testcafe-examples/node_modules/testcafe/src/compiler/index.js:117:34) at /Users/myUser/Documents/source/testcafe-examples/node_modules/testcafe/src/runner/bootstrapper.ts:267:25 at Object.guardTimeExecution [as default] (/Users/myUser/Documents/source/testcafe-examples/node_modules/testcafe/src/utils/guard-time-execution.ts:6:31) at Bootstrapper._getTests (/Users/myUser/Documents/source/testcafe-examples/node_modules/testcafe/src/runner/bootstrapper.ts:266:21) at async Promise.all (index 1) at Bootstrapper._bootstrapParallel (/Users/myUser/Documents/source/testcafe-examples/node_modules/testcafe/src/runner/bootstrapper.ts:366:38)

Any ideas to what the cause could be?

node v17.0.0 npm v8.1.0

Aleksey28 commented 2 years ago

Hi @shansean,

This issue was fixed in the testcafe@1.20.1. Before running examples, please update the TestCafe.