From 44b43e390acf666ed30350ffb421ea867f3d0309 Mon Sep 17 00:00:00 2001 From: Alexander Alemayhu Date: Wed, 14 Jun 2023 22:33:40 +0200 Subject: [PATCH] chore(parser): use constant for template directory path --- .../parser/Settings/helpers/parseTemplate.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/services/UploadService/parser/Settings/helpers/parseTemplate.test.ts b/src/services/UploadService/parser/Settings/helpers/parseTemplate.test.ts index a31260eae..253c47d3c 100644 --- a/src/services/UploadService/parser/Settings/helpers/parseTemplate.test.ts +++ b/src/services/UploadService/parser/Settings/helpers/parseTemplate.test.ts @@ -2,10 +2,11 @@ import path from 'path'; import fs from 'fs'; import { parseTemplate } from './parseTemplate'; +import { TEMPLATE_DIR } from '../../../../../lib/constants'; test('loads valid JSON', () => { const input = fs - .readFileSync(path.join(__dirname, '../../../../templates/n2a-basic.json')) + .readFileSync(path.join(TEMPLATE_DIR, 'n2a-basic.json')) .toString(); const template = parseTemplate(input); expect(template.name).toBe('n2a-basic');