NativeScript / NativeScript/nativescript-cli

Cannot run Karma Jasmine test even for HelloWorld

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

还没有人认领这个 Issue。

unit testing
主要语言
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

贡献指南

打开贡献指南

从这里开始

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

调研方向

首先使用链接的 HelloWorld 示例复现 ns test iosns test android。阅读 karma.conf.jstsconfig.json,包括报告中的 Jasmine、webpack 和测试文件配置,并记录失败输出。完成标准是 HelloWorld 模板运行其 Karma Jasmine 测试,并在控制台中显示结果。

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

评估

技术栈
javascript
领域
cli, mobile-dev, testing-qa
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
35/100

把新 issue 发到你的邮箱

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