我正在使用React,Jest和Typescript并遵循these文档使用此代码创建单元测试:
expect(HorizontalNotIndented.props().includedProp).to.equal(dummyValue);
我安装了所有类型,但在测试中使用Property 'to' does not exist on type 'FunctionMatchers<any>'.
时出现错误to
。
似乎似乎对Jest或Jasmine即将来临的to
感到有些困惑?我不确定100%,但我确实在关注酶文档。
非常感谢您提供指针。
如果使用笑话,则应使用.toBe()
代替.to.equal()
,如此处所述: