This repository has been archived by the owner. It is now read-only.

setUp of deferred tests are executed #107

Closed
jodal opened this Issue Feb 24, 2012 · 1 comment

Comments

Projects
None yet
2 participants
@jodal
Member

jodal commented Feb 24, 2012

setUp of deferred tests are executed, which means that errors in the test setUp method are repeated for tests you didn't expect to be executed, adding more identical error messages.

Given the following setup:

// buster.js 

var config = module.exports;

config['My tests'] = {
    environment: 'browser',
    tests: ['*-test.js']
};


// setup_of_deferred_tests_is_executed-test.js

buster.testCase('a test case', {
    setUp: function() {
        this_will_fail()
    },

    'test that should be executed': function() {
    },

    '//test that should not be executed': function() {
    }
});

We get the following test results:

$ buster test
Firefox 11.0 Linux: EE
Error: Firefox 11.0 Linux a test case test that should be executed
    ReferenceError: this_will_fail is not defined
    ()@./setup_of_deferred_tests_is_executed-test.js:5

Error: Firefox 11.0 Linux a test case test that should not be executed
    ReferenceError: this_will_fail is not defined
    ()@./setup_of_deferred_tests_is_executed-test.js:5

1 test case, 2 tests, 0 assertions, 0 failures, 2 errors, 0 timeouts
WARNING: No assertions!

@ghost ghost assigned cjohansen Feb 24, 2012

@cjohansen

This comment has been minimized.

Member

cjohansen commented Feb 24, 2012

@cjohansen cjohansen closed this Feb 24, 2012

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