Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jest-community/jest-pytest
A Jest and Pytest integration made in heaven 💖
https://github.com/jest-community/jest-pytest
jest pytest python testing
Last synced: 2 months ago
JSON representation
A Jest and Pytest integration made in heaven 💖
- Host: GitHub
- URL: https://github.com/jest-community/jest-pytest
- Owner: jest-community
- License: mit
- Created: 2018-05-19T11:39:10.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-01-22T22:40:56.000Z (12 months ago)
- Last Synced: 2024-11-11T20:14:56.414Z (2 months ago)
- Topics: jest, pytest, python, testing
- Language: Python
- Homepage: https://jest-community.github.io/jest-pytest
- Size: 9.09 MB
- Stars: 42
- Watchers: 2
- Forks: 9
- Open Issues: 108
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# jest-pytest
Based on [@cpojer](https://github.com/cpojer)'s amazing [Jest / Pytest work here](https://github.com/cpojer/pyjest), and adapted to work with pytest snapshots and a custom [JSON pytest reporter](https://github.com/jondot/pytest-jest).
Essentially, it's:
1. `jest-pytest` to tie up the Jest side.
2. `pytest-jest` to tailor-fit reporting from the Python side.## Quick Start
```
$ yarn add jest-pytest
```To your Python project, add `pytest-jest`:
```
pip install pytest-jest --upgrade
```Optionally, add [snapshots](https://github.com/syrusakbary/snapshottest):
```
pip install snapshottest
```And then add a `package.json` file with the following Jest pragma:
```json
"jest": {
"moduleFileExtensions": ["py"],
"runner": "jest-pytest",
"testPathIgnorePatterns": ["snap_.*\\.py"],
"testMatch": ["**/?(*_)test.py"]
}
```Note that this configuration will work well with Pytest [snapshots](https://github.com/syrusakbary/snapshottest).
# Contributing
Fork, implement, add tests, pull request, get my everlasting thanks and a respectable place here :).
### Thanks:
To all [Contributors](https://github.com/jondot/jest-pytest/graphs/contributors) - you make this happen, thanks!
# Copyright
Copyright (c) 2018 [Dotan Nahum](http://gplus.to/dotan) [@jondot](http://twitter.com/jondot). See [LICENSE](LICENSE.txt) for further details.