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

Code Review Issues - 03 #4

Open
weixiaobo88 opened this issue Sep 23, 2015 · 0 comments
Open

Code Review Issues - 03 #4

weixiaobo88 opened this issue Sep 23, 2015 · 0 comments

Comments

@weixiaobo88
Copy link

文件代码行 Comments
测试问题 测试中没有完整的集成测试,和 main.js 中一样流程的的使用了setFrames 方法的集成测试;同样也没有对方法 setFrames 本身的测试,这无法保证你给定的字符串输入是否能正确转换成frame得分的数组。
calculator-spec.js Line 9 测试用例的描述中“is fixed ” 的意思是什么,没看懂,是想说 “is mixed ” 吗。Line 68 测试用例的描述中 “all number” 是什么意思,前面几个用例都是 all number啊,没看到区别。
calculator-spec.js Line 83 中 beforeEach 的声明 不会因为你放在 83行,Line 9 的测试用例就无法使用。思考它的作用域,要么将其放在最前,要么做其他方式的移动。
封装性问题 在Calculator 类中对于 game.frames 以及 frame.firstBall 等属性的直接访问破坏了类的封装行,如果可以直接获取属性的值,那也可以修改属性的值。建议通过方法来获得相应属性的值。
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

No branches or pull requests

1 participant