jasmine-marbles ~0.3.0 seems not to work with RxJS 6
See original GitHub issueTested with version
- jasmine-marbles 0.3.1 with RxJS
- 6.0.0-tactical-rc.1
- 6.0.0-uncanny-rc.7
Code to reproduce:
- I described the steps to reproduce the error in the following issue: https://github.com/ng-practice/bern-18-04-10/issues/1
- for short:
git clone https://github.com/ng-practice/bern-18-04-10 git checkout marble-testing-probs yarn yarn test
Expected behavior:
The unit tests should pass.
Actual behavior:
Running karma test runner throws the following error:
HeadlessChrome 65.0.3325 (Windows 10.0.0) (effect) book-collection When a draft is saved successfully encountered a declaration exception FAILED
- Error: No test scheduler initialized
at getTestScheduler node_modules/jasmine-marbles/bundles/jasmine-marbles.umd.js:265:1)
at new TestHotObservable node_modules/jasmine-marbles/bundles/jasmine-marbles.umd.js:303:1)
at Object.hot node_modules/jasmine-marbles/bundles/jasmine-marbles.umd.js:313:1)
at Suite.<anonymous> src/app/book/effects/book-collection.effects.spec.ts:10:34)
at ZoneDelegate../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke node_modules/zone.js/dist/zone.js:388:1)
at Zone../node_modules/zone.js/dist/zone.js.Zone.run node_modules/zone.js/dist/zone.js:138:1)
at Suite.<anonymous> node_modules/zone.js/dist/zone-testing.js:491:1)
at Env.jasmineEnv.(anonymous function) [as describe] node_modules/zone.js/dist/zone-testing.js:424:1)
HeadlessChrome 65.0.3325 (Windows 10.0.0): Executed 1 of 3 (1 FAILED) (0 secs / 0 secs)
HeadlessChrome 65.0.3325 (Windows 10.0.0) (effect) book-collection When a draft is saved successfully encountered a declaration exception FAILED
Error: No test scheduler initialized
at getTestScheduler node_modules/jasmine-marbles/bundles/jasmine-marbles.umd.js:265:1)
at new TestHotObservable node_modules/jasmine-marbles/bundles/jasmine-marbles.umd.js:303:1)
at Object.hot node_modules/jasmine-marbles/bundles/jasmine-marbles.umd.js:313:1)
at Suite.<anonymous> src/app/book/effects/book-collection.effects.spec.ts:10:34)
at ZoneDelegate../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke node_modules/zone.js/dist/zone.js:388:1)
at Zone../node_modules/zone.js/dist/zone.js.Zone.run node_modules/zone.js/dist/zone.js:138:1)
at Suite.<anonymous> node_modules/zone.js/dist/zone-testing.js:491:1)
at Env.jasmineEnv.(anonymous function) [as describe] node_modules/zone.jHeadlessChrome 65.0.3325 (Windows 10.0.0): Executed 2 of 3 (1 FAILED) (0 secs / 0 seHeadlessChrome 65.0.3325 (Windows 10.0.0): Executed 3 of 3 (1 FAILED) (0 secs / 0 seHeadlessChrome 65.0.3325 (Windows 10.0.0): Executed 3 of 3 (1 FAILED) (0.116 secs / 0 secs)
error An unexpected error occurred: "Command failed.
Exit code: 1
Command: C:\\WINDOWS\\system32\\cmd.exe
Arguments: /d /s /c ng test
Directory: C:\\workbench\\projects\\bern-18-04-10
Output:
".
info If you think this is a bug, please open a bug report with the information provided in "C:\\workbench\\projects\\bern-18-04-10\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Please leave me a message if I can provide further information for you.
Kind Regards Gregor
Issue Analytics
- State:
- Created 5 years ago
- Reactions:7
- Comments:5
Top Results From Across the Web
jasmine-marbles ~0.3.0 seems not to work with RxJS 6 #21
Running karma test runner throws the following error: HeadlessChrome 65.0.3325 (Windows 10.0.0) (effect) book-collection When a draft is saved ...
Read more >ngrx/effects unit tests using jasmine-marbles - Stack Overflow
When I try to use either cold or hot functions from jasmine-marbles , I keep getting TypeError: Class constructor Observable cannot be invoked ......
Read more >jasmine-marbles - npm
Marble testing helpers for RxJS and Jasmine. ... Start using jasmine-marbles in your project by running `npm i jasmine-marbles`.
Read more >conflicting peer dependency: rxjs@6.6.7 - You.com | The Search ...
Use `--location=global` instead. npm WARN ERESOLVE overriding peer dependency npm WARN While resolving: jasmine-marbles@0.8.4 npm WARN Found: rxjs@7.4.0 npm ...
Read more >Testing RxJS Code with Marble Diagrams
This guide refers to usage of marble diagrams when using the new testScheduler.run(callback) . Some details here do not apply to using the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The answer as to how to fix this is on stackoverflow: https://stackoverflow.com/a/56364159/2486918
I reply myself to the issue: calling the method initTestScheduler() fixed the issue.