Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ES5 setup file correction #1194

Merged
merged 1 commit into from Sep 30, 2017
Merged

ES5 setup file correction #1194

merged 1 commit into from Sep 30, 2017

Conversation

dubbha
Copy link
Contributor

@dubbha dubbha commented Sep 28, 2017

ES5 configuration proposed originally basically doesn't work.
We're requiring 'enzyme' as Enzyme, but using configure() method out of nowhere:

var Enzyme = require('enzyme');
var Adapter = require('enzyme-adapter-react-16');

configure({ adapter: new Adapter() });

I derived my variant from the original ES6 version and it works fine for me:

var enzyme = require('enzyme');
var Adapter = require('enzyme-adapter-react-16');

enzyme.configure({ adapter: new Adapter() });

Need it specifically for the .babelrc ["env", { "modules": false }] case.

ES5 configuration proposed originally basically doesn't work. We're requiring 'enzyme' as Enzyme, but using configure() method out of nowhere:
```js
var Enzyme = require('enzyme');
var Adapter = require('enzyme-adapter-react-16');

configure({ adapter: new Adapter() });
```

I derived my variant from the original ES6 versino and it works fine for me.
Need it specifically for the .babelrc ["env", { "modules": false }] case.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants