Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oslabs-beta/Examin
Examin is a developer tool that generates React unit tests for your application. Ensure your application renders as expected before adding new features. Examin writes the baseline unit tests and allows developers to customize their tests for their application.
https://github.com/oslabs-beta/Examin
chrome enzyme examin jest react tdd typescript
Last synced: 2 months ago
JSON representation
Examin is a developer tool that generates React unit tests for your application. Ensure your application renders as expected before adding new features. Examin writes the baseline unit tests and allows developers to customize their tests for their application.
- Host: GitHub
- URL: https://github.com/oslabs-beta/Examin
- Owner: oslabs-beta
- License: mit
- Created: 2021-04-16T20:56:19.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-08-17T23:20:43.000Z (over 2 years ago)
- Last Synced: 2024-08-17T01:19:02.784Z (6 months ago)
- Topics: chrome, enzyme, examin, jest, react, tdd, typescript
- Language: TypeScript
- Homepage: http://examin.dev
- Size: 15.3 MB
- Stars: 85
- Watchers: 8
- Forks: 19
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Contributing: contributing.md
- License: LICENSE
Awesome Lists containing this project
README
Examin
Automatic React Unit Test Generator
examin.dev | Install Examin
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/facebook/react/blob/master/LICENSE)
[![Version](https://badge.fury.io/gh/tterb%2FHyde.svg)]()
[![GitHub Release](https://img.shields.io/static/v1?label=release&message=1.0.0.1&color=brightgreen)]()
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)]()
[![GitHub contributors](https://img.shields.io/static/v1?label=contributers&message=4&color=yellowgreen)]()## Features ⚡
Examin is a developer tool that generates React unit tests for your application. Ensure your application renders as expected before adding new features. Examin writes the baseline unit tests and allows developers to customize their tests for their application.
- Install the Examin extension
- Install npm dependencies for Jest/Enzyme
- Navigate to the Examin panel in Chrome developer tools
- ✨ Generate tests ✨## Installation 🔌
To get started, manually install Examin in Developer mode.
1. Clone the repo
`git clone https://github.com/oslabs-beta/Examin.git`
2. Install NPM packages
`npm install`
3. Create a build directory
`npm run build`
4. Load the unpacked extension from src/extension to ChromeNOTE: The React Developer Tools extension is also required for Examin to run, if you do not already have it installed on your browser.
## How to Use ❓️
1. Install Jest/Enzyme for your project
- `npm install jest enzyme enzyme-adapter-react-16 @babel/core @babel/preset-env`
- Add presets to your `.babelrc` file
`{ "presets": ["@babel/preset-env", "@babel/preset-react"] }`2. Run the Examin build using npm run dev
3. Navigate to the Examin panel in Chrome DevTools
- Must be in developer mode
- Revise import statements as needed4. Add Generated tests into your application
- Add `__tests__` directory in root directory
- Add test js file to `__tests__` directory
- Run tests using `jest` or `jest `
- Editing import statements
- Updating tests with state changes
- Selecting components for generated tests## Compatibility
- Requires React v16.8.0 or higher
- Functional components + React hooks
- Not yet compatible with component libraries or Context API## Troubleshooting ⁉️
- [Jest docs](https://jestjs.io/docs/getting-started)
- [Enzyme docs](https://enzymejs.github.io/enzyme/)
- Error: Unable to resolve dependency tree while installing `enzyme-adapter-react-16`
- Add peerDependencies to your **package.json** file
```sh
"peerDependencies": { "react": "^16.8.0 || ^17.0.0", "react-dom": "^16.8.0 || ^17.0.0" }
```## Contributing
Examin is open source on Github through the tech accelerator umbrella OS Labs. Please read the [contribution documentation](./contributing.md) to learn more on how you can participate in improvements.
## Core Team ☕ 💼
- **Cliff Assuncao** - [@Github](https://github.com/WizardSource) - [@LinkedIn](https://www.linkedin.com/in/cliff-assuncao-1b2593211/)
- **Kirsten Yoon** - [@Github](https://github.com/kirstenyoon) - [@LinkedIn](http://linkedin.com/in/kirstenyoon)
- **Nicholas Brush** - [@Github](https://github.com/Njbrush) - [@LinkedIn](https://www.linkedin.com/in/nicholas-j-brush/)
- **Ty Doan** - [@Github](https://github.com/tdoan35) - [@LinkedIn](https://www.linkedin.com/in/ty-thanh-doan/)