Julien-R44 / factorify

🏭 Framework-agnostic model factory system for clean testing

Home Page:https://factorify.julr.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

@julr/factorify

Framework-agnostic model factory system for clean testing.

Built-on top of Knex + Faker, and heavily inspired by Adonis.js and Laravel.

Have you ever written tests, in which the first 15-20 lines of each test are dedicated to just setting up the database state by using multiple models? With Factorify, you can extract all this set up to a dedicated file and then write the bare minimum code to set up the database state.

Features

  • Support for multiple databases ( SQLite, Postgres, MySQL, MSSQL ... )
  • Integrations with test runners
  • Define variations of your model using states
  • Define relations
  • Generate in-memory instances

Getting Started

Please follow the documentation at factorify.julr.dev !

About

🏭 Framework-agnostic model factory system for clean testing

https://factorify.julr.dev

License:MIT License


Languages

Language:TypeScript 100.0%