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

feat: add test support #15

Merged
merged 9 commits into from
Nov 20, 2016
Merged

feat: add test support #15

merged 9 commits into from
Nov 20, 2016

Conversation

atian25
Copy link
Member

@atian25 atian25 commented Nov 10, 2016

初步实现单元测试功能, 增加一个 helper, 这样 boilerplate 那边也可以用 egg-init 来测试自己

先 review 下看看有没有问题

@mention-bot
Copy link

@atian25, thanks for your PR! By analyzing the history of the files in this pull request, we identified @fengmk2 to be a potential reviewer.

@@ -2,29 +2,59 @@

const fs = require('fs');
const path = require('path');
const coffee = require('coffee');
// const coffee = require('coffee');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

删除掉吧

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

测试构建这块, 是直接 require 还是通过 coffee 启动来验证好呢? 前者的话, 会遇到上次那个问题, 验证不了 bin 文件.

如果这样, 那个 helper 就要看看怎么做到, 要看 coffee 如何 hack stdin

@popomore

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

coffee 有 write

Copy link
Member Author

@atian25 atian25 Nov 15, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这次先不管 coffee 这个, 下个 PR 我再看看怎么搞

@popomore
Copy link
Member

测试一直卡住的?

@atian25
Copy link
Member Author

atian25 commented Nov 17, 2016

之前没有 egg-ci, 现在重新跑, 晚上再修下

@popomore
Copy link
Member

挂了?

@atian25
Copy link
Member Author

atian25 commented Nov 18, 2016

修复了, 白天是因为 npm 的环境变量, registryUrl 带有 / 后缀.

最近感觉 travis-ci 执行好慢, 拉不到 github 的源码.

@popomore
Copy link
Member

我们晚上西方是白天,所以量就大了

@atian25 atian25 changed the title feat: add test supoort feat: add test support Nov 19, 2016
@atian25
Copy link
Member Author

atian25 commented Nov 19, 2016

想吐血...

测试一直不过是因为 fixtures 被 ignore 了...
image

测试一直不跑是因为这个勾...
image

@codecov-io
Copy link

codecov-io commented Nov 19, 2016

Current coverage is 81.92% (diff: 77.27%)

No coverage report found for master at c9a49c4.

Powered by Codecov. Last update c9a49c4...fe9c869

@atian25
Copy link
Member Author

atian25 commented Nov 19, 2016

cc @popomore 过了...

@popomore
Copy link
Member

+1

@popomore popomore merged commit 91e50f8 into master Nov 20, 2016
@popomore popomore deleted the test branch November 20, 2016 15:15
@@ -0,0 +1,5 @@
-r intelli-espower-loader
-r ./node_modules/egg-bin/node_modules/thunk-mocha
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

npm3 运行就有问题了。

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好吧, 这个 opts 我全局干掉好了. 之前是为了方便 webstorm.

Copy link
Member Author

@atian25 atian25 Nov 21, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, 其他几个 boilerplate 的都提 PR 干掉了

@atian25
Copy link
Member Author

atian25 commented Nov 21, 2016

1.5.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants