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

code error results in all tests passing #209

Trott opened this issue Sep 16, 2014 · 3 comments


Copy link

@Trott Trott commented Sep 16, 2014

See for a test file that exits with no output and a success code. It appears that coding errors in the tests can result in...uh...I guess this is a false negative?

Tested with lab 4.4.3.


This comment has been minimized.

Copy link

@Trott Trott commented Sep 16, 2014

And, to save you a click, here's the code with the issues. The first test should pass and the second one should fail.

var demo = require('../demo.js');

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

var expect = Lab.expect;
var describe = lab.experiment;
var it = lab.test;

describe('demo', function () {

    it('should export existing()', function (done) {
        expect(typeof demo.existing).to.equal('function');

        // If you leave out the done(), lab exits immediately with a success code even though the next test should fail.

        // If the above line is uncommented, this past succeeds and subsequent tests fail, as expected.

    it('should fail this test', function (done) {

And the only line in the demo.js module imported on the first line:

exports.existing = function () {};
Marsup added a commit to Marsup/lab that referenced this issue Sep 16, 2014

This comment has been minimized.

Copy link

@Marsup Marsup commented Sep 16, 2014

Did a PR for this one, full explanation there, this one was tricky !

@geek geek closed this in 5c5ba81 Sep 16, 2014
geek added a commit that referenced this issue Sep 16, 2014
Fix #209: omit undefined options
@geek geek added the bug label Sep 16, 2014
@geek geek self-assigned this Sep 16, 2014

This comment has been minimized.

Copy link

@geek geek commented Sep 16, 2014

Published as v4.4.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
3 participants
You can’t perform that action at this time.