"TypeError: Cannot call a class as a function" using hot/cold TestScheduler helpers #5976
Replies: 3 comments 2 replies
-
This sounds more like an issue with Babel output/configuration than RxJS. The call is totally valid, but it seems like whatever version of Babel you're on doesn't like calling |
Beta Was this translation helpful? Give feedback.
-
I ran into the same issue after migrating to Angular 12 from Angular 10. did anyone solved this issue?. |
Beta Was this translation helpful? Give feedback.
-
For anyone stumbling upon this error and pulling their hair out: |
Beta Was this translation helpful? Give feedback.
-
I am getting the following error when calling the "hot" helper provided by TestScheduler:
Using the "cold" helper also yields a similar error.
The issue seems to be related to the constructor calling
super()
. Could anyone please give me some indications on how to make this work? Is this a bug?Steps to reproduce:
npx @angular/cli@latest new test-app
tsconfig.spec.json
file to add the"target": "es5"
setting. With other targets (such ases2015
ores2020
the issue is not reproducible, however, I need to make this test work with thees5
setting.src/app/marbles.spec.ts
npm test
Complete issue reproduction example can be found here: https://github.com/Carlesgg97/rxjs-testscheduler-issue-repro
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions