NativeScript / NativeScript/nativescript-cli
Cannot run Karma Jasmine test even for HelloWorld
还没有人认领这个 Issue。
- 主要语言
- JavaScript
- 星标
- 1.1k
- 派生
- 204
- 平均合并
- 1 天 9 小时
- 30 天内合并 PR
- 8
描述
Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):
✔ Component nativescript has 8.0.1 version and is up to date.
ns doctor shows all green check marks
Android Runtime: 4.1.3
iOS Runtime: 12.4
XCode Version: 12.4
Plugin(s):
Describe the bug
Cannot run ns test ios or ns test android even it's just the HelloWord template directly from NativeScript WITHOUT one line of code added.
To Reproduce
create a project call HelloWorld ns create HelloWorld
'cd HelloWorld'
ns test init and pick Jasmine
add the following steps to fix some known issues
- npm install karma-webpack@next --save-dev
- In karma.conf.js, add webpack to frameworks section frameworks: ['jasmine', 'webpack']
- In tsconfig.json, add src/tests//*.ts in include section "include": ["src/tests//.ts", "src/**/.ios.ts", "src/**/*.android.ts"],
'ns test ios' or ns test android
Expected behavior
Test should run and result display on the console
Sample project
https://github.com/cupidchan/HelloWorld
Additional context
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先使用链接的 HelloWorld 示例复现 ns test ios 和 ns test android。阅读 karma.conf.js 和 tsconfig.json,包括报告中的 Jasmine、webpack 和测试文件配置,并记录失败输出。完成标准是 HelloWorld 模板运行其 Karma Jasmine 测试,并在控制台中显示结果。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript
- 领域
- cli, mobile-dev, testing-qa
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 35/100