Skip to content

runner hangs in the browser when exception is thrown from test #38

@aghassemi

Description

@aghassemi

When a test throws an exception, running Prova with --browser tag just hangs.

Likely related to updated to Tape 3.0.0 and this commit tape-testing/tape@b747374

Similar behaviour happens when tests run in Node ( it crashes the runner ) but at least the error stack is visible whereas in browser it just hangs.

I don't think crashing the runner when a test throws is ideal. Tests throwing exceptions should not break the runner and should just be reported as failures. Otherwise other unaffected tests won't run so we won't know how many other tests a particular bad commit breaks. It's important to consider that a test throwing exception does not mean the test itself has fatal errors in it and could very well be result of another change in another part of the system. For instance

test('foo.bar() = baz', function(t)) {
  var foo = require('fooModule');
  t.equal(foo.bar(),'baz');
}

would throw exception when someone else changes fooModule in a bad way, but that hardly justifies all of the runner crashing and other possibly unaffected tests not to run, it should just fail that test.

I don't know the justification behind tape-testing/tape@b747374 but maybe Prova can take over the try catch now that Tape doesn't.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions