Skip to content

Commit

Permalink
fix: Add test for builder (#303)
Browse files Browse the repository at this point in the history
  • Loading branch information
sasjo authored Aug 7, 2024
1 parent ed5e13d commit 020a9dc
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/builder/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build/
16 changes: 16 additions & 0 deletions packages/builder/test/index.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
const path = require('path');
const fs = require('fs');
const { build } = require('../src');

afterEach(() => {
fs.rmSync(path.resolve(__dirname, '..', 'build'), { recursive: true });
});

test('It can build a radar', async () => {
const outputFile = path.resolve(__dirname, '..', 'build', 'js', 'radar.json');
await build(
path.resolve(__dirname, 'radar', 'valid'),
outputFile,
);
expect(fs.existsSync(outputFile)).toEqual(true);
});

0 comments on commit 020a9dc

Please sign in to comment.