Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
basic-factory
Advanced tools
A basic tool providing an easy way to generate blocks of mock data for tests or as placeholders.
A basic tool providing an easy way to generate blocks of mock data for tests or as placeholders.
npm install --save-dev basic-factory
// OR YARN
yarn add --dev basic-factory
{appDir}/helpers/factories.js
import Factory from 'simple-factory'
const MyFactory = new Factory()
MyFactory.register('User', () => {
// Would probably use Faker or something to generate these fields randomly.
return {
username: `user${Math.random() * 100}`,
email: `user${Math.random() * 100}`
}
})
export default MyFactory
import MyFactory from '{appDir}/helpers/factories'
const oneUser = MyFactory.create('User')
const arrayOfUsers = MyFactory.createMany('User', 5)
yarn
/ npm install
yarn test
/ npm run test
See CONTRIBUTING.md
FAQs
[![Build Status](https://travis-ci.org/bkd705/basic-factory.svg?branch=master)](https://travis-ci.org/bkd705/basic-factory)
We found that basic-factory demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.