NativeScript / NativeScript/nativescript-cli

Allow configuring karma with TypeScript: karma.conf.ts

未关闭
#4,220 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

feature unit testing
主要语言
JavaScript
星标
1.1k
派生
204
平均合并
1 天 9 小时
30 天内合并 PR
8

描述

Is your feature request related to a problem? Please describe.

Allowing the developer to configure karma and be able to type check

Describe the solution you'd like

In the file lib/services/test-execution-service.ts the value for karma config is hardcoded on the line 326. Is it possible to discover the config file in the order similar to the one on the karma website: https://karma-runner.github.io/3.0/config/configuration-file.html ?

Describe alternatives you've considered

Additional context

Here is the location of the code discovering test file in the karma: https://github.com/karma-runner/karma/blob/master/lib/cli.js#L114..L129

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

阅读 lib/services/test-execution-service.ts 第 326 行附近的代码,并将其中硬编码的 Karma 配置选择与 lib/cli.js 第 114-129 行中的 Karma 发现逻辑进行比较。当 CLI 可以发现并使用 karma.conf.ts 配置,使开发者能够对其 Karma 配置进行类型检查时,即视为完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
typescript
领域
cli, testing
Issue 类型
功能
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
48/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。