From eea408130105b7488a64b34c88d927476241e40b Mon Sep 17 00:00:00 2001 From: merceyz Date: Thu, 30 May 2019 18:50:18 +0200 Subject: [PATCH] test: test:dev should ignore output --- test/index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/index.js b/test/index.js index 609a352..2c28b57 100644 --- a/test/index.js +++ b/test/index.js @@ -27,15 +27,20 @@ const options = { if (process.env.DEV_MODE) { const devDir = path.join(__dirname, 'dev_fixture'); + const defaultFixture = path.join(devDir, 'default'); if (fs.existsSync(devDir) === false) { // Setup a default test to make it easier to start debugging - const defaultFixture = path.join(devDir, 'default'); fs.mkdirSync(devDir); fs.mkdirSync(defaultFixture); fs.writeFileSync(path.join(defaultFixture, 'code.js'), 'clsx(foo && bar);'); process.exit(0); } + const outputFile = path.join(defaultFixture, 'output.js'); + if (fs.existsSync(outputFile)) { + fs.unlinkSync(outputFile); + } + pluginTester({ ...options, fixtures: devDir,