Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/joshnuss/prisma-database-cleaner
Utility for cleaning Prisma databases between test runs
https://github.com/joshnuss/prisma-database-cleaner
prisma testing
Last synced: about 1 month ago
JSON representation
Utility for cleaning Prisma databases between test runs
- Host: GitHub
- URL: https://github.com/joshnuss/prisma-database-cleaner
- Owner: joshnuss
- Created: 2022-09-28T02:51:58.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2022-10-26T06:13:34.000Z (about 2 years ago)
- Last Synced: 2024-05-14T21:03:03.154Z (6 months ago)
- Topics: prisma, testing
- Language: JavaScript
- Homepage:
- Size: 4.88 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
prisma-database-cleaner
-----------------------Utility for cleaning your Prisma database between test runs.
Extracted from [Sky Cart](https://github.com/joshnuss/sky-cart)
## Setup
```sh
pnpm install -D prisma-database-cleaner
```## Usage
Call `truncateAll()` before each test run.
```javascript
import { truncateAll } from 'prisma-database-cleaner'beforeEach(truncateAll)
```## License
MIT