Skip to content

Commit

Permalink
preflight
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinigami92 committed Apr 24, 2023
1 parent 6c9bced commit ed8cafe
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
9 changes: 8 additions & 1 deletion src/modules/datatype/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,14 @@ export class DatatypeModule {
return this.faker.helpers.weightedArrayElement<() => unknown>([
{ weight: 1, value: () => ({}) },
{ weight: 1, value: () => [] },
{ weight: 1, value: () => this.datetime() },
{
weight: 1,
value: () =>
this.faker.date.between({
from: Date.UTC(1970, 0),
to: Date.UTC(2200, 0),
}),
},
{ weight: 1, value: () => null },
])();
}
Expand Down
6 changes: 3 additions & 3 deletions test/__snapshots__/datatype.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ exports[`datatype > 42 > object > noArgs 3`] = `null`;
exports[`datatype > 42 > object > noArgs 4`] = `{}`;
exports[`datatype > 42 > object > noArgs 5`] = `2075-10-07T15:29:05.646Z`;
exports[`datatype > 42 > object > noArgs 5`] = `2149-04-30T17:19:34.850Z`;
exports[`datatype > 42 > string > noArgs 1`] = `"ky2eiXX/J/"`;
Expand Down Expand Up @@ -477,13 +477,13 @@ exports[`datatype > 1337 > number > noArgs 5`] = `0.3210005429573357`;
exports[`datatype > 1337 > object > noArgs 1`] = `[]`;
exports[`datatype > 1337 > object > noArgs 2`] = `2007-06-16T10:42:27.147Z`;
exports[`datatype > 1337 > object > noArgs 2`] = `2006-07-01T09:44:53.900Z`;
exports[`datatype > 1337 > object > noArgs 3`] = `{}`;
exports[`datatype > 1337 > object > noArgs 4`] = `[]`;
exports[`datatype > 1337 > object > noArgs 5`] = `2040-07-10T23:23:28.285Z`;
exports[`datatype > 1337 > object > noArgs 5`] = `2075-08-23T08:59:20.515Z`;
exports[`datatype > 1337 > string > noArgs 1`] = `"U/4:SK$>6Q"`;
Expand Down

0 comments on commit ed8cafe

Please sign in to comment.