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

exception tests support #2

Merged
merged 4 commits into from Dec 8, 2013
Merged

exception tests support #2

merged 4 commits into from Dec 8, 2013

Conversation

azu
Copy link
Owner

@azu azu commented Dec 7, 2013

We should support try-catch like assert.throws.

例外吐くとその時点でテストが終わってしまうので、例外ぐらいはサポートしたい

よい構文が思いつかないので募集中。

throw new Error(); // => Error
throw new Error(); // => X

@azu
Copy link
Owner Author

azu commented Dec 7, 2013

Firefox、Chrome両方共REPLだとErrorって返すようなので、=> Error
と書いた場合は例外ハンドリングとするかな
細かいtypeは今はなくてもいい気がする。

2013-12-07 at 22 48

@azu
Copy link
Owner Author

azu commented Dec 7, 2013

error.gif

エラーハンドリングできるようになった。

assertionのエラーなのか、ただの文法エラーなのかを区別できてないので、その辺の拡張も必要そう

@azu
Copy link
Owner Author

azu commented Dec 8, 2013

ErrorオブジェクトでAssertionErrorなのか、単なるエラーなのか区別は
error.name === "AssertionError" でやるほうがよいかも。

azu added a commit that referenced this pull request Dec 8, 2013
Exception tests support
@azu azu merged commit c2a1a66 into master Dec 8, 2013
@azu azu deleted the ticket/id/2 branch December 8, 2013 06:27
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.

None yet

1 participant