https://github.com/smooth-code/factory-girl-objection-adapter
Objection adapter for Factory Girl 👩🏭
https://github.com/smooth-code/factory-girl-objection-adapter
factory-girl factory-girl-adapter knex objection
Last synced: 6 months ago
JSON representation
Objection adapter for Factory Girl 👩🏭
- Host: GitHub
- URL: https://github.com/smooth-code/factory-girl-objection-adapter
- Owner: smooth-code
- License: mit
- Created: 2018-03-31T09:37:14.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-03-14T12:43:06.000Z (over 5 years ago)
- Last Synced: 2025-04-02T06:22:18.236Z (6 months ago)
- Topics: factory-girl, factory-girl-adapter, knex, objection
- Language: JavaScript
- Homepage:
- Size: 193 KB
- Stars: 10
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# factory-girl-objection-adapter
[![travis][travis-image]][travis-url]
[![npm][npm-image]][npm-url][travis-image]: https://img.shields.io/travis/smooth-code/factory-girl-objection-adapter/master.svg
[travis-url]: https://travis-ci.org/smooth-code/factory-girl-objection-adapter
[npm-image]: https://img.shields.io/npm/v/factory-girl-objection-adapter.svg
[npm-url]: https://npmjs.org/package/factory-girl-objection-adapterThis module brings [objection](http://vincit.github.io/objection.js/) support to [factory-girl](https://github.com/aexmachina/factory-girl).
```
npm install factory-girl-objection-adapter
```## Usage
```js
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