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

Bundle update and resolve JavaScript errors #12

merged 10 commits into from Oct 14, 2017


None yet
1 participant
Copy link

muryoimpl commented Oct 9, 2017

I upgraded Ruby version to 2.4.2, bundled gems, JavaScript packages and re-run rails webpacker:install && rails webpacker:install:react.

When I upgraded webpacker, React is up to v16 and errors occurred around JavaScript tests, so I resolved errors.

muryoimpl added some commits Oct 9, 2017

Upgrade "enzyme" and add "enzyme-adapter-react-16", "react-test-rende…

To avoid error caused by upgrading to react 16 (incomplete)
Add "setupFiles" to Jest configuration in package.json
To load "app/javascript/__tests__/helpers/setup-test-env.js" before
running each test.
Add `raf` package and import polyfills
To avoid "requestAnimationFrame" warning by react 16, app adds `raf` and
import "raf/polyfill".
Warning: React depends on requestAnimationFrame. Make sure that you load a polyfill in older browsers.

React 16 requires Set, Map and requestAnimationFrame, so app needs to
import "babel-polyfill" and "raf/polyfill".
Add Enzyme configuration to Jest's setup file
To run test for React 16 apps, it needs to upgrade Enzyme 3. And
Enzyme v3 needs configuration about adapter(new feature). This app uses
react 16 so it uses enzyme-adapter-react-16 as adapter.

@muryoimpl muryoimpl merged commit 8cde7e9 into develop Oct 14, 2017

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
continuous-integration/travis-ci/push The Travis CI build passed

@muryoimpl muryoimpl deleted the bundle-update branch Oct 14, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.