@rocketseat/rocket-scripts

Configuration and scripts to power Rocketseat's react apps

Usage no npm install needed!

<script type="module">
  import rocketseatRocketScripts from 'https://cdn.skypack.dev/@rocketseat/rocket-scripts';
</script>

README

rocket-scripts

This package includes scripts and configurations used to power all Rocketseat's react apps.

Tests

As rocket-scripts can be used with both javascript and typescript files, it is necessary to configure based on what you're using.

To use the tests with rocket-scripts it is necessary to configure the enzyme with the following packages:

Javascript

yarn add enzyme enzyme-adapter-react-16 -D

Typescript:

yarn add enzyme enzyme-adapter-react-16 @types/enzyme @types/enzyme-adapter-react-16 -D

And add the file src/setupTests.ts with the basic settings below:

import Enzyme from "enzyme";
import Adapter from "enzyme-adapter-react-16";

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

Merging configurations

You can merge the default settings with your own.

Jest

Create a file named jest.config.js and export an object with the settings you want to change.

License

MIT © Rocketseat


Made with ♥️