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

Browser tests doesn't fail when there's no assertions in a test #69

Closed
augustl opened this Issue Feb 15, 2012 · 5 comments

Comments

Projects
None yet
2 participants
@augustl
Member

augustl commented Feb 15, 2012

Given this test case

buster.testCase("Honk", {
    "if you're horny": function () {
    }
});

I expected the tests to fail since my test has no assertions. Instead it succeeds and is all green.

@ghost ghost assigned cjohansen Feb 15, 2012

@cjohansen

This comment has been minimized.

Member

cjohansen commented Feb 20, 2012

Fixed in buster 0.4.4

@cjohansen cjohansen closed this Feb 20, 2012

@augustl augustl reopened this Feb 21, 2012

@augustl

This comment has been minimized.

Member

augustl commented Feb 21, 2012

This is still broken in master. I just did a buster-dev-tools/update.js and when I run tests with no assertions the test run is still green.

@cjohansen

This comment has been minimized.

Member

cjohansen commented Feb 21, 2012

You're not seeing something like this?

Chrome 17.0.963.56 Linux: .
1 test case, 1 test, 0 assertions, 0 failures, 0 errors, 0 timeouts
WARNING: No assertions!
@augustl

This comment has been minimized.

Member

augustl commented Feb 27, 2012

You now need more than one test case to reproduce this issue. Here's an example of a test case where this error is present.

buster.testCase("navstack", {
    setUp: function () {
        this.n = new Navstack();
    },

    "should add root controller": function () {
        var c = {};
        this.n.pushController(c);
        assert.equals(this.n.controllers.length, 1);
        assert.same(this.n.controllers[0], c);
    },

    "should get paths for list of controllers": function () {
    }
});
@cjohansen

This comment has been minimized.

Member

cjohansen commented Feb 28, 2012

FIXED. Problem was that the browser runner and the node runner had different defaults for failOnNoAssertions

@cjohansen cjohansen closed this Feb 28, 2012

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