我正在处理两个几乎相同的测试用例,我应该断言期望两个 NgRx 效果返回一个布尔值流。在第一个测试用例中一切都按预期工作,尽管对第二个测试用例执行相同的操作,但我无法使其按预期工作。无论我做什么,收到的值总是一个空数组:
expect(received).toEqual(expected) // deep equality
- Expected
+ Received
- Array [
- Object {
- "frame": 10,
- "notification": Notification {
- "error": undefined,
- "hasValue": true,
- "kind": "N",
- "value": true,
- },
- },
- ]
+ Array []
Run Code Online (Sandbox Code Playgroud)
logger.effects.spec.ts:
expect(received).toEqual(expected) // deep equality
- Expected
+ Received
- Array [
- Object {
- "frame": 10,
- "notification": Notification {
- "error": undefined,
- "hasValue": true,
- "kind": "N",
- "value": true, …Run Code Online (Sandbox Code Playgroud)