Using Node.js exit codes for testing equality? #537

Closed
haeroe opened this Issue Nov 19, 2012 · 4 comments

2 participants

@haeroe

Hi,

First off, apologies if this is already implemented in some vein. I've looked through the documentation and googled, but haven't found anything that might relate.

We're currently using Grunt for testing in a Node.js project. One thought that came up was using the exit codes from running our code as a factor in checking whether a test passes or not. Could a function for this be implemented, or if it exists, could it be added to the documentation?

Cheers,
haeroe

@cowboy
grunt member

In your custom task, you can cause grunt to exit with a non-zero exit code by using one of the grunt.fail methods. Grunt's default behavior is to exit with an exit code of 0 on success or non-zero otherwise.

@cowboy cowboy closed this Nov 21, 2012
@cowboy
grunt member

FWIW, this is the 0.3.x exit code list and this is the 0.4.0a exit code list.

@haeroe

I saw the list, but that's exit codes for grunt proper. I was asking about getting the exit code from scripts run inside tests.

@cowboy
grunt member

Scripts? I don't know what you mean.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment