GTBitsOfGood / bog-component-library

A reusable, easily readable, easily integrated, and widely used component library for Bits of Good.
https://bog-component-library.netlify.app/
1 stars 0 forks source link

tests written #102

Closed Fattimo closed 2 years ago

Fattimo commented 2 years ago

Description

Closes #86

Adds testing into the repository.

Type of change

✨ Refactor

How to Test

yarn yarn test

Checklist

netlify[bot] commented 2 years ago

✔️ Deploy Preview for bog-component-library ready!

🔨 Explore the source changes: f335632c1469f52d9d907a2586522358607f2968

🔍 Inspect the deploy log: https://app.netlify.com/sites/bog-component-library/deploys/620ab755b88ec60007057d34

😎 Browse the preview: https://deploy-preview-102--bog-component-library.netlify.app

Fattimo commented 2 years ago

Things to consider after this paradigm is approved:

therealsharath commented 2 years ago

Is there a way we can automate the "run all tests" question. Like by default run all the tests? 🤔

Fattimo commented 2 years ago

https://stackoverflow.com/questions/57968249/create-react-app-configure-jest-run-all-test-files

Although I think it's better as is in terms of the package.json script and keeping the test on watch mode for development experience, but probably swapping to test all when putting it up on a CI script

therealsharath commented 2 years ago

Sounds good to me. I thought the tests would have a visual output instead of just the terminal, but yeah you're right about keeping it in watch mode as it makes sense from a dev perspective. I was also thinking of setting up a Github action to block pushes if the tests are failing but that can be done later.

Fattimo commented 2 years ago

https://storybook.js.org/addons/@storybook/addon-jest