Skip to content

Report bad test() usage as a test failure, rather than a runtime error #698

Open
@jamestalmage

Description

@jamestalmage

Issuehunt badges

Sometimes you get sloppy / distracted and end up with a half completed test:

// you have some good tests:

test('foo', t => {
  // this will never be executed because of the mistakes below
});

// This throws - saying it should be a todo test:
test('fooo');

// Ooops - did you get distracted?:
test();

// Todo should not have an implementation, it is intended to document future tests/features.
test.todo('foo', t => {});

Instead of throwing when someone misuses the API, I think the misuse should just be reported as a failure. It should still execute the correctly written tests.

There is a $40.00 open bounty on this issue. Add more on Issuehunt.

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