Skip to content

Commit

Permalink
ES5 setup file correction
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
dubbha authored and OleksiyDubovyk committed Sep 28, 2017
1 parent 106b5d1 commit 4b31eba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/installation/react-16.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ ES5:
<!-- eslint no-var: 0 -->
```js
// setup file
var Enzyme = require('enzyme');
var enzyme = require('enzyme');
var Adapter = require('enzyme-adapter-react-16');

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

<!-- eslint no-var: 0 -->
Expand Down

0 comments on commit 4b31eba

Please sign in to comment.