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

Errors thrown in after & afterEach can cause immediate exit with code 0 #277

Closed
kanongil opened this issue Nov 21, 2014 · 1 comment · Fixed by #278
Assignees
Labels
Milestone

Comments

@kanongil
Copy link
Member

@kanongil kanongil commented Nov 21, 2014

var Lab = require('lab');
var lab = exports.lab = Lab.script();

lab.describe('fail test', function () {

    lab.after(function (done) {
        throw new Error('crapping out');
    });

    lab.it('checks for something', function (done) {
        throw new Error('check failed');
    });
});

Expected result
Exit with non zero code and some console output.

Actual result
Exit with code 0 and some console output.

The error means that automated systems will incorrectly think that all tests successfully passes.

@kanongil kanongil added the bug label Nov 21, 2014
@geek geek self-assigned this Nov 21, 2014
@geek geek modified the milestones: 5.0.4, 5.1.0 Nov 21, 2014
@geek geek added feature and removed bug labels Nov 24, 2014
@geek

This comment has been minimized.

Copy link
Member

@geek geek commented Nov 24, 2014

@kanongil landed in v5.1.0

@geek geek closed this Nov 24, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.