Angular单元测试的一个错误消息
生活随笔
收集整理的這篇文章主要介紹了
Angular单元测试的一个错误消息
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
錯誤消息:
‘expect’ was used when there was no current spec, this could be because an asynchronous test timed out
原始的單元測試代碼:
describe('Jerry for Spartacus unit test', () => {const valueService = new ValueService();expect(valueService.getValue()).toEqual('Jerry'); } );解決方法
describe('Jerry for Spartacus unit test', () => {it('#getValue unit test here!', () => {const valueService = new ValueService();expect(valueService.getValue()).toEqual('Jerry');}); });要獲取更多Jerry的原創文章,請關注公眾號"汪子熙":
總結
以上是生活随笔為你收集整理的Angular单元测试的一个错误消息的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: ZMI 10000mAh充电宝口袋版发布
- 下一篇: 通用创建汽车开源协议,邀请友商使用测试