【问题标题】:'No specs found' showing in karma console业力控制台中显示“未找到规格”
【发布时间】:2020-10-27 16:10:31
【问题描述】:

我正在使用 jasmine 对我的 angular 8 项目进行一些测试。在我的系统中,它显示通过了 46 个规范。我将代码推送给大师。但是,当我的同事在他的系统中运行ng test 时,它会显示No specs found。但是他可以看到spec文件中有很多测试用例。可能的原因是什么?他应该在他的系统中做什么来运行测试?

【问题讨论】:

    标签: angular typescript unit-testing karma-jasmine


    【解决方案1】:

    也许您可以检查 tsconfig.spec.json 是否相似,并且 karmaTest.ts 也可以,尤其是这一行 const context = require.context('./', true, /\.spec\.ts$/);

    【讨论】:

      猜你喜欢
      • 2023-03-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-02-11
      • 2015-06-30
      • 1970-01-01
      • 2020-05-26
      • 1970-01-01
      相关资源
      最近更新 更多