Skip to content

Needless Babel transform (breaks where Babel not used) #80

@waynerobinson

Description

@waynerobinson

The following line

if (sources.code.indexOf("ock(") >= 0 || opts?.instrument) {
is pretty greedy with determining if Babel should be used for a transform or not.

I have lock() functions in my code that match on this and then cause a transform error.

Should this be changed to sources.code.indexOf("mock(")?

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