From f4cb169acbed89a97d854163cc94f9385cc39b2a Mon Sep 17 00:00:00 2001 From: KaKa Date: Tue, 21 Nov 2023 15:51:52 +0800 Subject: [PATCH] test: coverage on missing #229 --- test/job-utils.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/job-utils.js b/test/job-utils.js index 287f79b..0fdcdad 100644 --- a/test/job-utils.js +++ b/test/job-utils.js @@ -92,3 +92,15 @@ test('getJobNames: ignores jobs with no valid name', (t) => { t.deepEqual(names, ['hey', 'hello']); }); + +test('getJobPath: missing dot in accepted extensions', (t) => { + const path = jobUtils.getJobPath('foo', ['js', 'ts'], 'js'); + + t.is(path, 'foo.js'); +}); + +test('getJobPath: having dot in default extension', (t) => { + const path = jobUtils.getJobPath('foo', ['js', 'ts'], '.js'); + + t.is(path, 'foo.js'); +});