npm.io
10.18.2 • Published 1 year ago

@commercetools-test-data/utils

Licence
MIT
Version
10.18.2
Deps
3
Size
9 kB
Vulns
0
Weekly
0
Stars
16

@commercetools-test-data/utils

This package provides the utils needed when you author your generators.

Install

$ pnpm add -D @commercetools-test-data/utils

createRelatedDates

import { createRelatedDates } from '@commercetools-test-data/utils';
const [getOlderDate, getNewerDate] = createRelatedDates();
const generator = Generator<{ lastModifiedAt: string; createdAt: string }>({
  fields: {
    createdAt: fake(getOlderDate),
    lastModifiedAt: fake(getNewerDate),
  },
});

Keywords