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

Ignored exit-code by ibrik cover _mocha -- test/**/*.spec.coffee #34

Open
59naga opened this issue Jun 6, 2015 · 1 comment
Open

Ignored exit-code by ibrik cover _mocha -- test/**/*.spec.coffee #34

59naga opened this issue Jun 6, 2015 · 1 comment

Comments

@59naga
Copy link

59naga commented Jun 6, 2015

$ ibrik cover _mocha -- test/**/*.spec.coffee
// -> 0

Exit code should be inherited of mocha's exit code.
Because, result is "build passed" if run this command in travis.

Example:

https://travis-ci.org/59naga/jasminetea/builds/65717291#L189


追伸:
TravisCIでテスト書いてnpm testでテストしながらカバレッジ取ってるんですが、終了コードで1が返らないようです。
試しに、process.exitイベントを監視して、lib/command.jsのコールバック内で受け取った値を返してプロセスを終了するようにしたら、1で落ちるようになりました(下記ビルド65723859#L170を参照)。

59naga added a commit to 59naga/ibrik that referenced this issue Jun 6, 2015
@59naga
Copy link
Author

59naga commented Jun 6, 2015

Before:

$ npm test
> ibrik cover _mocha -- test/**/*.spec.coffee
# ...
# The command "npm test" exited with 0.

https://travis-ci.org/59naga/jasminetea/builds/65717291#L189

After:

$ npm test
> ibrik cover _mocha -- test/**/*.spec.coffee
# ...
# The command "npm test" exited with 1.

https://travis-ci.org/59naga/jasminetea/builds/65723859#L170

child_process.spawnで0か1返すかチェックするテスト書いて試してみたんですが、どうもargvのパースに失敗してるのか、常に1を返して、カバレッジが取れない結果しか取れなかったです。

うまいやり方あったら教えて下さい…。

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