Skip to content

QUnit tests fail with "Script error ..." #44

@jayarjo

Description

@jayarjo

All QUnit tests fail in all browsers with:

Uncaught Error: pushFailure() assertion outside test context, was     at F.QUnit.start (.../qunit.js:464:10)`, unless I set `QUnit.config.autostart = false;

The problem is at: lib/hub/view/public/inject.js#L7:

// Do not start QUnit tests before bind,
// we need to setup logging callbacks first.
if (window.QUnit && window.QUnit.config) {
    window.QUnit.config.autostart = false;
}

This is executed when there is no QUnit in global space yet (inject.js is always the first script, in fact yeti makes sure it to be first) - code above has no chance to execute, ever.

So autostart is never disabled and QUnit.start() is run twice.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions