Skip to content

Commit

Permalink
chore(parser): use constant for template directory path
Browse files Browse the repository at this point in the history
  • Loading branch information
aalemayhu committed Jun 14, 2023
1 parent e1c76c6 commit 44b43e3
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 44b43e3

Please sign in to comment.