Skip to content

selimb/fast-prisma-tests

Folders and files

NameName
Last commit message
Last commit date

Latest commit

5547851 Β· Oct 17, 2024

History

7 Commits
Oct 30, 2022
Oct 30, 2022
Oct 30, 2022
Oct 17, 2024
Oct 30, 2022
Sep 18, 2022
Oct 30, 2022
Oct 30, 2022
Oct 30, 2022
Oct 30, 2022
Oct 30, 2022
Sep 18, 2022

Repository files navigation

Fast Prisma Tests

Companion repo for my blog post: Speedy Prisma+PostgreSQL Tests. Based on Prisma's official testing-express example. The first commit in this repo is in fact a copy of that example.

Setup

1. Install NPM dependencies

$ npm install

2. Start the database

You can run the following to start a new PostgreSQL Docker container:

$ ./scripts/pg-docker.sh

You're otherwise free to start postgres however you'd like.

3. Configuration

Rename the .env.example file to .env, and make sure DB_URL is accurate -- if you started postgres with pg-docker.sh, then you don't need to change anything.

Running Tests

$ npm test