diff --git a/packages/builder/.gitignore b/packages/builder/.gitignore new file mode 100644 index 00000000..567609b1 --- /dev/null +++ b/packages/builder/.gitignore @@ -0,0 +1 @@ +build/ diff --git a/packages/builder/test/index.test.js b/packages/builder/test/index.test.js new file mode 100644 index 00000000..60e21947 --- /dev/null +++ b/packages/builder/test/index.test.js @@ -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); +});