我更新了我的依赖项,现在面临以下错误消息:
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。
版本:
7.5.2
该脚本在rxjs 6.6.7上工作。
发布于 2022-01-16 02:32:18
我认为新的文档显示了新的expectObservable:
expectObservable(new BehaviorSubject(true).asObservable()).toBe(expected);发布于 2022-09-02 12:48:20
茉莉花-大理石版=> 0.9.0支持RxJS 7.x
https://stackoverflow.com/questions/70713035
复制相似问题