Skip to content

Commit

Permalink
test: test:dev should ignore output
Browse files Browse the repository at this point in the history
  • Loading branch information
merceyz committed May 30, 2019
1 parent 2b59da8 commit eea4081
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit eea4081

Please sign in to comment.