facebookarchive / instant-articles-builder

Instant Articles Rules Editor
https://facebook.github.io/instant-articles-builder
Other
125 stars 67 forks source link

Upgrade Babel #130

Closed pestevez closed 4 years ago

pestevez commented 4 years ago

This PR upgrades the Babel packages used by the tool, and moves them to the dev dependencies.

The intent is to fix an issue with Jest which is making the tests fail.

To test you can run npm install && npm test

Before the upgrade:

> npm test

...

● Test suite failed to run

    Plugin/Preset files are not allowed to export objects, only functions. In /instant-articles-builder/node_modules/babel-preset-es2015/lib/index.js

Test Suites: 7 failed, 7 total
Tests:       0 total
Snapshots:   0 total
Time:        1.963s, estimated 7s

After the upgrade:

> npm test

...

 PASS  src/js/models/__tests__/RulePropertyDefinition.test.js
 PASS  src/js/models/__tests__/Rule.test.js
 PASS  src/js/utils/__tests__/RulePropertyUtils.test.js
 PASS  src/js/utils/__tests__/RuleExporter.test.js
 PASS  src/js/utils/__tests__/RuleUtis.test.js
 PASS  src/js/data/__tests__/RuleStore.test.js
 PASS  src/js/components/__tests__/RuleList.react-test.js (5.072s)

Test Suites: 7 passed, 7 total
Tests:       55 passed, 55 total
Snapshots:   0 total
Time:        5.937s
Ran all test suites.
pestevez commented 4 years ago

Thanks @mburak!