Skip to content

Releases: tiloio/test-randomizing

0.5.1 - Creator function possibility for freezeMergeFactory

24 Jul 15:06
Compare
Choose a tag to compare

freezeMergeFactory can now be called with an object or a function.

// called with function
const randomNumber = freezeMergeFactory(() => Math.random());
randomNumber() === randomNumber() // depends on the randomness

// called with object
const randomNumber = freezeMergeFactory(Math.random());
randomNumber() === randomNumber() // is always true

0.5.0 Introduce freezeMergeFactory

12 Apr 19:34
Compare
Choose a tag to compare

Introduce freezeMergeFactory to have simpler handling in tests.

# Example
import { freezeMergeFactory } from "https://x.nest.land/[email protected]/mod.ts";

const randomPerson = freezeMergeFactory<Person>({
  firstName: faker.name.firstName(),
  lastName: faker.name.lastName(),
  companyName: faker.company.companyName(),
});

Deno.test("consist of [email protected]", () => {
  const person = randomPerson({
    firstName: "steve",
    lastName: "jobs",
    companyName: "apple",
  });

  const email = generateEmail(person);

  assertEquals(email, "[email protected]");
});

0.4.1 Docs

31 Dec 15:57
Compare
Choose a tag to compare

Some documentation.

0.4.0 Sync version with nest.land, deno.land and npm

31 Dec 11:11
Compare
Choose a tag to compare

0.2.1 Fix entrypoint

30 Dec 22:04
Compare
Choose a tag to compare

Entrypoint with mod.ts like deno best practices.

0.2.0 Deep freeze merge

30 Dec 21:22
Compare
Choose a tag to compare

Freeze merge freezes now nested properties, objects and arrays.

Full Changelog: https://github.com/tiloio/test-randomizing/commits/0.2.0