Skip to content

Create an inconclusive assertion #326

@NoelAbrahams

Description

@NoelAbrahams

The inconclusive assert would be used as follows:

test("My test", function () {
          inconclusive();
          // or with message        
         inconclusive("The submit click handler needs a test case");
});

When run the, the test would display in (say) orange (compared to red for fail and green for pass) , with the provided message or the default "Test pending" message.

We've hacked this together to work for us, here is a snippet that adds a class for the styling.

li.className = assertion.result === null ? "inconclusive" : (assertion.result ? "pass" : "fail");

It would be great if this can be included in the API.

It has proven very useful for creating place-holders for pending tests, and also for frameworks on top of QUnit that iterate an object and flag untested methods.

Thanks.
Noel

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions