Skip to content

Fix code coverage mapping to src/browser-polyfill.js #348

@rpl

Description

@rpl

As a follow up to #345 we should fix the sourcemap-based code coverage remapping to make sure it does map correctly with the original source code in src/browser-polyfill.js.

At the moment it isn't the case because the sourcemap is generated by babel when we convert the polyfill script into an umd module, but after the grunt replace plugin has interpolated the content of api-metadata.json into it, which is what prevents the sourcemap-based code coverage to map to the original source code.

As an alternative approach to the grunt replace plugin, we could use a small custom babel plugin to inject the api-metadata.json into the source file, which should allow babel to generate a sourcemap file that maps to the original source instead of the intermediate interpolated file.

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