Skip to content

Code coverage reset when re-loading module #1168

@rhpijnacker

Description

@rhpijnacker

Since upgrading from Intern 3 to Intern 4 we have a number of files that have (much) lower code coverage.

I've been able to chase this down to test cases that use a (dojo) context require with a map to reroute dependencies to mock files. After the test case is finished, we clean up the loaded module (using require.undef) to force-load it (without mocked dependencies) the next time it is needed.

It seems that reloading a module with Intern 4 resets the coverage built up so far, whereas with Intern 3 this wasn't the case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions