From 188309a59cfe6fbd33e120dedf3bdfef3276d641 Mon Sep 17 00:00:00 2001 From: ST-DDT Date: Thu, 14 Nov 2024 22:50:04 +0100 Subject: infra(unicorn): consistent-function-scoping (#3255) --- test/modules/git.spec.ts | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'test/modules/git.spec.ts') diff --git a/test/modules/git.spec.ts b/test/modules/git.spec.ts index e4692b20..164b19c6 100644 --- a/test/modules/git.spec.ts +++ b/test/modules/git.spec.ts @@ -8,6 +8,16 @@ const NON_SEEDED_BASED_RUN = 5; const refDate = '2020-01-01T00:00:00.000Z'; +function isValidCommitAuthor(email: string): boolean { + // `validator.isEmail()` does not support display names + // that contain unquoted characters like . output by Git so we need + // to quote the display name + const quotedEmail = email.replace(/^(.*) { seededTests(faker, 'git', (t) => { t.itEach('branch', 'commitMessage'); @@ -56,27 +66,18 @@ describe('git', () => { expect(parts.length).toBeLessThanOrEqual(7); expect(parts[0]).toMatch(/^commit [a-f0-9]+$/); - const isValidAuthor = (email: string) => { - // `validator.isEmail()` does not support display names - // that contain unquoted characters like . output by Git so we need - // to quote the display name - const quotedEmail = email.replace(/^(.*)