-
Couldn't load subscription status.
- Fork 2
Fixed #7 #16
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
base: develop
Are you sure you want to change the base?
Fixed #7 #16
Conversation
src/components/Canvas.js
Outdated
| } | ||
| getPosition(event) { | ||
| if (event.clientX) { | ||
| if (typeof event.clientX === 'number') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src ディレクトリ以下の修正は、テストとは関係ないので、別の issue を立てて治したいです。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
わかりましたー
test/actions/changeWidthTest.js
Outdated
| const width = 40; | ||
| expect(action(width)).to.deep.equal({ | ||
| type: CHANGE_WIDTH, | ||
| width |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ごめん。このあたりも、lineWidth で統一しておきましょうか。
同様に、changeWidth も changeLineWidth にしておきたいです。
別の issue で直しましょう。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
りょうかいです
| @@ -0,0 +1,12 @@ | |||
| import action from 'actions/changeColor'; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
テストは各モジュールの unit test というより、ユーザのアクションベースでやっていって良いような気がします。
たとえば、changeColor のテストだと、Pallet 上の "red" パネルをクリック and タッチする。というユーザのアクションを与えて、結果的に、きちんと Canvas の color が変わっていることをチェックしていけば良いかと思います。
DevTools のテストはこんな感じです。
https://github.com/devtools-html/debugger.html/tree/master/src/test/mochitest
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dadaa そうなんですね
となると、unit test はいらなくなるでしょうか。
No description provided.