npm

Need private packages and team management tools?Check out npm Orgs. »

test-values

2.0.5 • Public • Published

Test Values

A collection of helpers for generating values for tests.

Usage

npm install --save test-values

Then just require it:

var Values = require('test-values');

Names

user.name = Values.name(); // eg. John Smith
user.name = Values.name(true); // eg. Sam

Words

thing.name = Values.word(); // eg. thesaurus

Numbers

thing.amount = Values.number(); // eg. 91527
thing.amount = Values.number(10); // eg. 7
thing.amount = Values.number(10, 100); // eg. 27
thing.amount = Values.number(10, 100, 2); // eg 13.37

Emails

user.email = Values.email(); // eg. john_smith_124223@test.com
user.email = Values.email('something.com'); // eg. sam_jones_122321@something.com

Phone numbers

user.phone = Values.phone(); // eg. 0410123432
user.phone = Values.phone('+61'); // eg. +61424123456

URLs

user.url = Values.url(); // eg. http://sam-max-rachael-janice.com

install

npm i test-values

Downloadsweekly downloads

7

version

2.0.5

license

ISC

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability