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

Support async testing #8

Closed
azu opened this issue Mar 2, 2014 · 1 comment
Closed

Support async testing #8

azu opened this issue Mar 2, 2014 · 1 comment

Comments

@azu
Copy link
Owner

azu commented Mar 2, 2014

  • runInNewContext は非同期のコードの実行完了が取れない
  • 変換後のASTからassertの数を数える
  • assertにhookして、実行終了タイミングを伝える
  • vmモジュールは諦めて、普通に変換後のコードを生成して実行する
@azu
Copy link
Owner Author

azu commented Mar 22, 2014

node vm + domain error handling

domainを使えば、無理やり例外も取れることがわかったので、次の方針でいけそう

  • runDocTestを非同期対応にする Promises?
  • ASTから assert の個数を数える
  • VM contextでassertをhookして、数えた数が実行されたら終了
  • domainでエラーをキャッチして、エラーだったらテスト失敗に投げる。
  • レポーターも変更

@azu azu closed this as completed in c3720d6 Mar 22, 2014
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