我已经更新了我的依赖项,现在遇到了这个错误消息:
DEPRECATION: The matcher factory for "toBeObservable" accepts custom equality testers, but this parameter will no longer be passed in a future release. See <https://jasmine.github.io/tutorials/upgrading_to_Jasmine_4.0#matchers-cet> for details.
Error: Expected $[0].notification to be a kind of Object, but was Notification({ kind: 'N', value: true, error: undefined, hasValue: true }).
at <Jasmine>
at toBeObservableComparer (node_modules/jasmine-marbles/es6/index.js:80:1)
at <Jasmine>
测试非常简单:
const expected = cold('a', {a: true});
expect(new BehaviorSubject(true)).toBeObservable(expected);
它可能与弃用通知有关,但我只是使用toBeObservable()
最新版本的jasmine-marbles
包,看不到自定义参数。我也不明白为什么Notification
不是一种Object
.
版本:
- rxjs:7.5.2
- 茉莉花核:4.0.0
- 茉莉花弹珠:0.8.4
- 业力茉莉花:4.0.1
该脚本适用于 rxjs 6.6.7。