From 410e157567991145bcc6d9efb595e78e845b3cea Mon Sep 17 00:00:00 2001 From: Alex Dubovyk Date: Thu, 28 Sep 2017 23:32:17 +0300 Subject: [PATCH] ES5 setup file correction 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. --- docs/installation/react-16.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/installation/react-16.md b/docs/installation/react-16.md index 804653d97..556b9a93f 100644 --- a/docs/installation/react-16.md +++ b/docs/installation/react-16.md @@ -41,10 +41,10 @@ ES5: ```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); ```