Skip to content

a way to merge reports from multiple node versions? #3680

@ljharb

Description

@ljharb

Is your feature request related to a problem? Please describe.
Specifically, I have lots of packages that do feature-detection - something that, eg, works in node 20 and not in node 18 - and so running the tests in node 20 won't "survive" mutation of that feature-detection precisely because it would require the older engine to test.

If I run the tests in node 18, then a different complementary set of code will "survive" mutation.

Describe the solution you'd like
This problem occurs in code coverage as well, and the industry-wide solution there is to generate coverage reports as files on disk, and then to merge those after CI is done, and then report on the final result - meaning, in order for a mutation to have "survived", it has to have done so in every input to the merged final report.

Describe alternatives you've considered
Asking for the ability to have "ignore mutation" comments or similar; manually ignoring results I know aren't a problem; or not using this mutation approach at all.

Additional context

[Survived] ConditionalExpression
index.js:1:14
-   var hasMap = typeof Map === 'function' && Map.prototype;
+   var hasMap = true;

in an engine without native Map, this mutation will fail a great many tests; but in an engine with it, it will survive. This should not be reported, as long as I'm able to run the mutation on a node version without Map (or, as long as I'm able to run a "preamble" that deletes Map before running the tests and mutations).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions