我正在尝试使用jasmine-marbles
但出现错误进行简单测试
这是我的测试代码:
describe('MarbleTestingComponent', () => {
it('should test marble syntax', () => {
const provided = search('e');
const expected = cold('(e|)', {e: 'e'});
console.log(expected, provided);
expect(provided).toBeObservable(expected);
})
});
这是我得到的错误:
Error:
Expected: (e|),
Received: (?|),
Expected:
[{"frame":0,"notification":{"kind":"N","value":"e","hasValue":true}},{"frame":0,"notification":{"kind":"C","hasValue":false}}]
Received:
[{"frame":0,"notification":{"kind":"N","value":"e"}},{"frame":0,"notification":{"kind":"C"}}],
如果我使用jest
框架,上面的代码可以工作,但我想让它与 Angular 设置附带的默认测试框架一起工作
感谢您对解决此错误的任何帮助谢谢