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
一些约定的备忘, 待讨论 #18
Comments
cc @eggjs/core |
我的建议是
其他一些遇到的文档细节约定都在这里讨论吧 |
这个不需要吧,模块名称带 egg-,但是插件名称不需要。 |
egg 全小写这个之前讨论过的,不能首字母大写和全大写 |
我们现在有很多插件是 userService 这样命名的。。 |
命名这个讨论过。
对于可以中划线也可以不用的情况,不做强制约定,例如 链接不贴了 issue 188 |
这个命名规范回头可以移植到 docs 下 |
就按 @shaoshuai0102 说的来吧。 |
注释和文档里面出现的代码, 建议都在第一行加上文件地址
|
其实这个就是约定,社区肯定会存在驼峰党和非驼峰党 |
egg 保留的 Symbol 就用全局的,之后可以整理出来
|
单元测试
let app;
before(function* () {
app = mm.app({
baseDir: 'security',
});
yield app.ready();
});
it('test', function* (){
const result = yield require(app.callback()).get('/');
assert(result.text.match(/hi, egg/));
});
1) Array #indexOf() should return index when the value is present:
AssertionError: # path/to/test/mocha_node.js:10
assert(this.ary.indexOf(zero) === two)
| | | | |
| | | | 2
| -1 0 false
[1,2,3]
[number] two
=> 2
[number] this.ary.indexOf(zero)
=> -1 |
那可以不用 supertest-as-promise 了? |
不用了 |
The text was updated successfully, but these errors were encountered: