javascript - Karma 是否会针对 Angular 和 Jasmine 的 future 版本进行更新?

标签 javascript angular typescript testing jasmine

我尝试更新我们公司的 Angular 模块,随之而来的是所需的依赖项更新。所以我去了所有最新版本。其中包括 jasmine-core 5.0.0。这破坏了我们的 Jasmine-karma-HTML-Reporter,因为 2.0.0 版本是 Jasmine-karma-HTML-Reporter 一年以来的最后一个版本。该版本依赖于 Jasmine-core 4.x.x,这让我研究了所有其他 karma 依赖项。我发现很多(如果不是全部)karma 软件包自一年或更长时间以来都没有得到更新。 所以我想弄清楚这些是否会得到更新或者是否有任何类似的其他软件包。如果我们必须迁移它,我们希望变化尽可能小。另外,我们希望保留 karma.config 的可配置性,是否存在这样的东西?

我们希望更新到 Angular 16,其中包含所有最新版本。 目前我又回到了 Jasmine-core 4.6.0,但这不是长期的解决方案。我去了所有karma包对应的NPM帖子。

最佳答案

简短回答:不。 Karma is deprecated and is not accepting new features or general bug fixes :

The web testing space has evolved significantly in the 10+ years since Karma's creation. The web landscape looks very different today and new patterns and tools have emerged in the ecosystem. New test runners offer more performant alternatives, and Karma no longer provides clear unique value.

Based on the current state of the web testing ecosystem, we have made the hard decision to deprecate Karma.

We know Karma is used particularly commonly in the Angular ecosystem, so Angular is adding Jest and Web Test Runner support to provide a migration path off of Karma. See the Angular blog for more details.

Critical security issues in Karma will still be triaged and fixed as necessary. This will continue until 12 months after Angular CLI's Web Test Runner support is marked stable.

For those outside Angular looking to migrate off Karma, both Web Test Runner and jasmine-browser-runner provide browser-based unit testing solutions which can be used as a direct alternative. Jest and Vitest also provide Node-based alternatives.

推荐替代方案严格超出了 StackOverflow 的范围,但希望以上内容提供了一些指导。

关于javascript - Karma 是否会针对 Angular 和 Jasmine 的 future 版本进行更新?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/76342169/

相关文章:

Javascript (JQuery) 删除最后一个单词

angular - 当 Font Awesome 带宽使用量超过我本月计划允许的 npm 带宽时,会发生什么?

typescript - Denjucks 使用 Deno 渲染,未定义不是函数

node.js - typescript 错误中的字符串枚举

javascript - Typescript:将类型定义为类型与部分存在的对象的联合

javascript - System JS一次调用加载多个依赖

javascript 作为 oop 可能吗?

javascript - 如何使按钮在 JavaScript 的新选项卡中打开链接?

typescript - Angular 2错误提供的参数与调用目标的任何签名都不匹配

Angular (4.0.0-beta.8) 测试组件夹具在使用子组件执行测试后未定义