Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

docs: no doc for turrffle test exit status code #2155

Closed
yxliang01 opened this issue Jul 4, 2019 · 3 comments
Closed

docs: no doc for turrffle test exit status code #2155

yxliang01 opened this issue Jul 4, 2019 · 3 comments

Comments

@yxliang01
Copy link

yxliang01 commented Jul 4, 2019

Issue

There's no documentation for the exit status code of truffle test.

Steps to Reproduce

Read all published documentations - --help message, official website(https://www.trufflesuite.com/docs/truffle/reference/truffle-commands), README.md.

Expected Behavior

There should be documentation for the exit status code of truffle test

@icherkashin
Copy link

icherkashin commented Jul 5, 2019

Hello @yxliang01 !

I believe that truffle delegates the responsibility for exit codes to mocha.
However, mocha itself does not appear to have a clear documentation on its exit codes.
The best information I have found so far is that the exit code is the number of failed tests, or 255 if there are more than 255 failed tests.

mochajs/mocha#3559

https://github.com/mochajs/mocha/blob/5d4dd98747637d0e7ed3007328ec9627dd7eda41/lib/cli/run-helpers.js#L35

@yxliang01
Copy link
Author

yxliang01 commented Jul 5, 2019

Yeah @icherkashin, your finding matches mine. So, I believe this should be added to the truffle documentation.

icherkashin added a commit to icherkashin/trufflesuite.com that referenced this issue Jul 6, 2019
Per trufflesuite/truffle#2155

Truffle documentation does not describe the exit status of `truffle
test` command. Neither does `mocha`, except in its source code.

The changes introduced by this commit may benefit the project in these
ways:
  - Providing a link to `mocha` source code shows that the issue is not
  caused by `truffle`
  - Users searching for `mocha exit status` may find the answer in
  `truffle` documentation, which increases awareness of the project
@eggplantzzz
Copy link
Contributor

#1197 documents this behavior

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants