-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jasmine-marbles ~0.3.0 seems not to work with RxJS 6 #21
Comments
Any progress on this? I am facing the same issue. Thanks. |
I reply myself to the issue: calling the method initTestScheduler() fixed the issue. |
I am having the same problem, we ran I can provide information on version of angular if needed. (EDIT) Trying davidgallegolobato's fix just caused another error. |
Angular 8.0.0 and RxJS 6.5.2 has this issue as well. |
The answer as to how to fix this is on stackoverflow: import { addMatchers, initTestScheduler } from 'jasmine-marbles';
beforeEach(() => {
...
initTestScheduler();
addMatchers();
}); |
Tested with version
Code to reproduce:
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
The text was updated successfully, but these errors were encountered: