@takeout/fixture-factory

1.0.5 • Public • Published

Takeout Fixture Factory

Fixture factory package for Takeout

Installation

yarn add @takeout/fixture-factory

Usage

// User.fixture.js
import faker from 'faker'
import FixtureFactory from '@takeout/fixture-factory'

function user () {
  return {
    name: faker.name.findName(),
    email: faker.internet.email()
  }
}

export default new FixtureFactory(user)
import fixture from './User.fixture.js'

fixture.create()
fixture.get('name') // Yazmin Veum
fixture.data // { name: 'Maddison Roob', email: 'joe.smith@gmail.com' }

Publish package to NPM

  1. Update version in package.json
{
  "version": "1.0.1"
}
  1. Build the package
yarn build
  1. Deploy to NPM registery
npm publish

Readme

Keywords

none

Package Sidebar

Install

npm i @takeout/fixture-factory

Weekly Downloads

3

Version

1.0.5

License

MIT

Unpacked Size

773 kB

Total Files

4

Last publish

Collaborators

  • rahulspace
  • renjithvk