aboutsummaryrefslogtreecommitdiff
path: root/test/git.spec.ts
diff options
context:
space:
mode:
authorKevin Meinhardt <[email protected]>2022-11-07 09:46:38 +0100
committerGitHub <[email protected]>2022-11-07 08:46:38 +0000
commit7c661c63d4eb6345ef7aab1836dc7643d412dd0c (patch)
treedc4260895d59cc171df12b9f4bef97e5c78f9a9c /test/git.spec.ts
parent1bed40369974db6a15db3e6cb8e765717e640ad1 (diff)
downloadfaker-7c661c63d4eb6345ef7aab1836dc7643d412dd0c.tar.xz
faker-7c661c63d4eb6345ef7aab1836dc7643d412dd0c.zip
feat(git): add options.refDate to commitEntry (#1512)
Diffstat (limited to 'test/git.spec.ts')
-rw-r--r--test/git.spec.ts11
1 files changed, 9 insertions, 2 deletions
diff --git a/test/git.spec.ts b/test/git.spec.ts
index 5f3287da..18cb153a 100644
--- a/test/git.spec.ts
+++ b/test/git.spec.ts
@@ -5,6 +5,8 @@ import { seededTests } from './support/seededRuns';
const NON_SEEDED_BASED_RUN = 5;
+const refDate = '2020-01-01T00:00:00.000Z';
+
describe('git', () => {
afterEach(() => {
faker.locale = 'en';
@@ -13,8 +15,13 @@ describe('git', () => {
seededTests(faker, 'git', (t) => {
t.itEach('branch', 'commitMessage', 'commitSha', 'shortSha');
- // The timestamp is not fixed, so we can't compare it
- t.todo('commitEntry');
+ t.describe('commitEntry', (t) => {
+ t.it('with only string refDate', { refDate })
+ .it('with only Date refDate', { refDate: new Date(refDate) })
+ .it('with only number refDate', {
+ refDate: new Date(refDate).getTime(),
+ });
+ });
});
describe(`random seeded tests for seed ${faker.seed()}`, () => {