File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 33## What is a test?
44
55A test must be a node script that exercises a specific functionality provided
6- by node and checks that it behaves as expected. It should return 0 on success,
6+ by node and checks that it behaves as expected. It should exit with code ` 0 ` on success,
77otherwise it will fail. A test will fail if:
88
9- - It exits by calling ` process.exit(code) ` where ` code != 0 `
10- - It exits due to an uncaught exception.
9+ - It exits by setting ` process.exitCode ` to a non-zero number.
10+ - This is most often done by having an assertion throw an uncaught
11+ Error.
12+ - Occasionally, using ` process.exit(code) ` may be appropriate.
1113- It never exits. In this case, the test runner will terminate the test because
1214 it sets a maximum time limit.
1315
You can’t perform that action at this time.
0 commit comments