gpt4 book ai didi

angular - Jasmine 在所有测试通过后抛出错误

转载 作者:行者123 更新时间:2023-12-05 07:19:14 24 4
gpt4 key购买 nike

我所有的单元测试都通过了。但是会抛出如下错误:

Chrome 74.0.3729 (Linux 0.0.0) ERROR
An error was thrown in afterAll
Uncaught TypeError: You provided 'undefined' where a stream was expected. You can provide an Observable, Promise, Array, or Iterable. thrown
Chrome 74.0.3729 (Linux 0.0.0): Executed 20 of 79 (skipped 4) ERROR (0 secs / 3.634 secs)
Chrome 74.0.3729 (Linux 0.0.0) ERROR
An error was thrown in afterAll

这不是因为我的实现。 我没有在我的测试中使用任何 afterAll 初始化 block 。有什么想法吗?

最佳答案

我以前遇到过这种类型的问题。这要么来自不应该的异步测试,要么来自事后要进行的清理(取消订阅或 TestBed.resetTestingModule())。

关于angular - Jasmine 在所有测试通过后抛出错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57864804/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com