BlueChilli / ChilliSource.Front.Modules

Monorepo of Chillifront Modules
0 stars 0 forks source link

Setup testing environment #30

Closed pash90 closed 5 years ago

pash90 commented 5 years ago

Setup the testing environment for CS.Front.Modules. I converted the project to a create-react-app which allows us to use the testing environment and configuration provided by create-react-app. This also involves small changes in the CS.Front.Installer repository which are being done as well.

The testing environment uses jest as its test runner and enzyme for DOM manipulation and traversal.

To test:

  1. Add __tests__ folder to the component folder, if not already present
  2. Add a file with the extension .js
  3. Write your tests as you normally would
  4. yarn test will auto-compile and run the tests with every code change & save you do.

Fixes #28