This module brings objection support to factory-girl.
npm install factory-girl-objection-adapter
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
MIT