Describe the bug
I encountered this while trying to fix a unit tests that still fails in an Angular 11 update attempt, where a component has an EventEmitter property. However Investigating further it boils down to the combination Observable + nextWithValues not working.
To Reproduce
Steps to reproduce the behavior:
Add the following tests in packages/jasmine-auto-spies/src/tests/observable-spy-utils.spec.ts under the "GIVEN observable spy is configured to emit" test (which ought to be renamed to "GIVEN observable spy is configured to emit a single value").
FAILED TESTS:
GIVEN observable spy is configured to emit multiple values
×
-> Then return value should be the fake values
Chrome Headless 90.0.4430.85 (Windows 10)
Error: Expected [ ] to be [ [ 'FAKE EMITTED VALUE1', 'FAKE EMITTED VALUE2', 'FAKE EMITTED VALUE3' ]. Tip: To check for deep equality, use .toEqual() instead of .toBe() ].
at <Jasmine>
at UserContext.<anonymous> (webpack:///src/tests/observable-spy-utils.spec.ts:565:43 <- test.js:23:96914)
at promisify (C:/git/github/auto-spies/node_modules/@hirez_io/jasmine-given/dist/jasmine-given.js:37:33)
at C:/git/github/auto-spies/node_modules/@hirez_io/jasmine-given/dist/jasmine-given.js:283:36
TOTAL: 1 FAILED, 0 SUCCESS
Describe the bug I encountered this while trying to fix a unit tests that still fails in an Angular 11 update attempt, where a component has an
EventEmitter
property. However Investigating further it boils down to the combinationObservable
+nextWithValues
not working.To Reproduce Steps to reproduce the behavior:
packages/jasmine-auto-spies/src/tests/observable-spy-utils.spec.ts
under the "GIVEN observable spy is configured to emit" test (which ought to be renamed to "GIVEN observable spy is configured to emit a single value").yarn test:full
.Expected behavior
The test should not fail like the following: