Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

完善edp-*模块的测试用例 #124

Closed
leeight opened this issue Feb 21, 2014 · 12 comments
Closed

完善edp-*模块的测试用例 #124

leeight opened this issue Feb 21, 2014 · 12 comments
Assignees
Milestone

Comments

@leeight
Copy link
Member

leeight commented Feb 21, 2014

现在只有 ecomfe/edp-build 这个模块有部分测试代码,其它的都基本没有,每次发布新版本都是靠人肉测试,导致无法让更多的人放心的加入开发工作中来,因此需要完善各个模块的单元测试代码,保证每次发布的功能稳定,相关的测试用例也能优化代码的结构,方便新同学的入手和学习。

@leeight leeight assigned erik168 and unassigned erik168 Feb 21, 2014
@otakustay
Copy link
Member

edp有太多功能是对文件系统的操作了,这一块我们是不是需要研究出一个针对文件系统做测试的方法来?其它的主要还是工具模块,感觉测试是需要的但很细碎也不一定会对整体的正确性有很大帮助

@leeight
Copy link
Member Author

leeight commented Feb 23, 2014

@leeight
Copy link
Member Author

leeight commented Feb 23, 2014

@otakustay 不仅仅是文件的操作,例如edp-build里面的processor之类的逻辑,以及edp-project中更新文件的逻辑都需要覆盖的,否则一旦有修改,完全不放心的。

@otakustay
Copy link
Member

对的,我的意思是类似文件系统的操作这种,总不能mkdirtouch来造出文件系统给测试,所以我们要不要想想办法如何使用一些手段让这类测试更好写?比如有没有成熟的文件系统的mock库

@leeight
Copy link
Member Author

leeight commented Feb 23, 2014

貌似大部分情况下直接spyOn就好了,例如这样子的:https://github.com/ecomfe/edp-project/blob/master/test/module.spec.js#L31

@errorrik
Copy link
Contributor

预先手造都好过每次run都mkdir和touch吧

发自我的 iPhone

在 2014年2月23日,下午9:58,Gray Zhang notifications@github.com 写道:

对的,我的意思是类似文件系统的操作这种,总不能mkdir和touch来造出文件系统给测试,所以我们要不要想想办法如何使用一些手段让这类测试更好写?比如有没有成熟的文件系统的mock库


Reply to this email directly or view it on GitHub.

@errorrik
Copy link
Contributor

北北,你定好测试框架吧,我下周也召集下这边的同学

发自我的 iPhone

在 2014年2月23日,下午10:13,leeight notifications@github.com 写道:

貌似大部分情况下直接spyOn就好了,例如这样子的:https://github.com/ecomfe/edp-project/blob/master/test/module.spec.js#L31


Reply to this email directly or view it on GitHub.

@leeight
Copy link
Member Author

leeight commented Feb 23, 2014

不是好早之前就定下来了么?用的是jasmine-node

@errorrik
Copy link
Contributor

哪个repo有sample不?

发自我的 iPhone

在 2014年2月23日,下午10:27,leeight notifications@github.com 写道:

不是好早之前就定下来了么?用的是jasmine-node


Reply to this email directly or view it on GitHub.

@leeight
Copy link
Member Author

leeight commented Feb 24, 2014

哪个repo有sample不?

edp-projectedp-build

@leeight
Copy link
Member Author

leeight commented Feb 25, 2014

查看当前模块的状态:https://github.com/ecomfe/edp-cli/wiki/Package-Status

@leeight leeight added this to the 0.7.0 milestone Feb 28, 2014
@leeight leeight self-assigned this Feb 28, 2014
@leeight leeight modified the milestones: 1.0.0, 0.7.0 Mar 13, 2014
@leeight
Copy link
Member Author

leeight commented Mar 26, 2014

好像大部分都写了,先关闭这个issue了

@leeight leeight closed this as completed Mar 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants