0.1.1 • Published 1 year ago
typeorm-data-fixtures v0.1.1
typeorm-data-fixtures
typeorm-data-fixtures provides an easy and consistant way to load test fixtures into a database with TypeORM.
This library provides three constructs:
- Factory creates entities with random or partially prepared data.
- Static fixtures load entities and data with fixed data when a test suite starts.
Along with these, typeorm-data-fixtures has many features that help us spend more time on writing actual tests.
Installation
With npm
npm install --dev typeorm-data-fixtures
or with yarn
yarn add -D typeorm-data-fixtures
TypeORM is a peer dependency.
experimentalDecorators
must be set to true in tsconfig.json
, although this already should have been set if TypeORM is installed.
Examples of usage you can find in examples folder
Some code was taken from here
License
MIT