@commercetools-test-data/utils
v10.11.2
Published
Data model for commercetools platform common types
Downloads
27,571
Readme
@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),
},
});