Skip to content

Latest commit

 

History

History
36 lines (25 loc) · 961 Bytes

README.md

File metadata and controls

36 lines (25 loc) · 961 Bytes

factory-girl-objection-adapter

travis npm

This module brings objection support to factory-girl.

npm install factory-girl-objection-adapter

Usage

import { factory } from 'factory-girl'
import ObjectionAdapter from 'factory-girl-objection-adapter'
import User from './models/User'

factory.setAdapter(new ObjectionAdapter())

factory.define('user', User, {
  name: factory.chance('name'),
  email: factory.chance('email'),
})

export default factory

License

MIT