speedskater / babel-plugin-rewire

A babel plugin adding the ability to rewire module dependencies. This enables to mock modules for testing purposes.
843 stars 90 forks source link

ReferenceError: Enzyme is not defined #204

Open FezVrasta opened 6 years ago

FezVrasta commented 6 years ago

Anytime I try to enable this plugin in my app I get:

ReferenceError: Enzyme is not defined

My babelrc is:

{
  "presets": ["react-app"],
  "env": {
    "test": {
      "plugins": ["rewire"]
    }
  }
}

Am I doing something wrong? It seems like none of my imported modules works when the plugin is enabled.

Maybe related to https://github.com/speedskater/babel-plugin-rewire/issues/183?