Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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