TestyTesterson

raw JSON →
9001.9001.9020 verified Sat Apr 25 auth: no javascript

A module to generate ridiculous test data, version 9001.9001.9020. Regularly released, it provides random usernames, names, emails, lorem ipsum text, image URLs, birthdays, countries, and IP addresses. Differentiated by its intentionally nonsensical and humorous output, suitable for mocking data in development and testing environments where realism is not required.

error ERR_REQUIRE_ESM: require() of ES Module not supported
cause Using require() on an ESM-only module.
fix
Use import statement: import testercle from 'testytesterson'
error TypeError: testercle.username is not a function
cause Forgetting to call the method with parentheses.
fix
Use testercle.username() instead of testercle.username
breaking ESM-only since v9001.9001.9000; require() fails with ERR_REQUIRE_ESM
fix Use import instead of require.
gotcha imageUrl() returns 'https://api.adorable.io/avatars/200/...' which is now a dead service.
fix The image URL API may return 404; consider using a different placeholder service.
gotcha Output is intentionally ridiculous and non-deterministic; cannot be used for reproducible test data.
fix Use a deterministic fake data library if reproducibility is needed.
npm install testytesterson
yarn add testytesterson
pnpm add testytesterson

Demonstrates basic usage of all generator methods using default import.

import testercle from 'testytesterson';
console.log(testercle.username());   // curtis frejaboing
console.log(testercle.name());       // Huge Spotsausage
console.log(testercle.email());      // mazingknife@jean-luc.com
console.log(testercle.lorem());
console.log(testercle.imageUrl());   // https://api.adorable.io/avatars/200/vastbritchesdrug.png
console.log(testercle.birthdayISO());
console.log(testercle.country());    // BE
console.log(testercle.ip());         // 149.33.8.251