Skip to content

Conversation

@shundroid
Copy link
Collaborator

No description provided.

}
getPosition(event) {
if (event.clientX) {
if (typeof event.clientX === 'number') {
Copy link
Member

Choose a reason for hiding this comment

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

src ディレクトリ以下の修正は、テストとは関係ないので、別の issue を立てて治したいです。

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

わかりましたー

const width = 40;
expect(action(width)).to.deep.equal({
type: CHANGE_WIDTH,
width
Copy link
Member

Choose a reason for hiding this comment

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

ごめん。このあたりも、lineWidth で統一しておきましょうか。
同様に、changeWidth も changeLineWidth にしておきたいです。
別の issue で直しましょう。

Copy link
Collaborator Author

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';
Copy link
Member

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@dadaa そうなんですね

となると、unit test はいらなくなるでしょうか。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants