jest-pg
TypeScript icon, indicating that this package has built-in type declarations

1.3.3 • Public • Published

jest-pg

Create postgres database scheme for each test and delete the database after test using jest globalSetup/globalTeardown.

NOTE: typeorm is used

Configuration

This uses TYPEORM configuration from environment variables. You can put it in a .env file or specify TYPEROM_* when running jest

Usage

jest.config.js

...
globalSetup: "jest-pg/src/setupDatabase",
globalTeardown: "jest-pg/src/teardownDatabase",
...

Package Sidebar

Install

npm i jest-pg

Weekly Downloads

57

Version

1.3.3

License

MIT

Unpacked Size

6.61 kB

Total Files

11

Last publish

Collaborators

  • cfanap