NativeScript / NativeScript/nativescript-cli
Feature Request: Provision to put test files in feature folder instead of tests folder
还没有人认领这个 Issue。
- 主要语言
- JavaScript
- 星标
- 1.1k
- 派生
- 204
- 平均合并
- 1 天 9 小时
- 30 天内合并 PR
- 8
描述
From @shripalsoni04 on September 30, 2016 15:2
It will be great if we can put our test files in the respective feature folder instead of putting all the test files in app/tests folder.
When we do development for web version of angular application, we put the test files in respective feature folders with .spec.ts suffix as per the angular style guide.
If we can do the same thing in angularNative app also, it will be very easy to get started and it will open a way for unit-test code sharing. As currently we have different structures for test files in nativescript and web version, we cannot share the unit-test files easily and we need to manually copy the unit-test files and change the import path of the module being tested in test file for any cross platform shared code.
I thought to run a script which copies all the .spec.ts file to tests folder from feature folders, but then it will add complexities like adding new/changed test files back to app/tests folder in watch mode.
Let me know if there is already some way and I am missing that.
Thanks.
Copied from original issue: NativeScript/nativescript-angular#482
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先定位 CLI 当前如何发现和处理 app/tests 下的测试文件,包括 watch 模式的行为。将该流程与功能文件夹中所要求的 .spec.ts 文件进行比较,并确定共享测试的预期行为;当无需手动复制即可支持功能本地测试时,即视为完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- angular, typescript
- 领域
- cli, testing
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100