Skip to content

Commit

Permalink
fix: clear cache before each test in cache-flags.test.js
Browse files Browse the repository at this point in the history
  • Loading branch information
piecyk committed Oct 22, 2020
1 parent 793b444 commit 65107da
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/core-flags/cache-flags.test.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
'use strict';

const path = require('path');
const rimraf = require('rimraf');
const { run, isWindows } = require('../utils/test-utils');
const { existsSync, writeFileSync, unlinkSync } = require('fs');
const { resolve } = require('path');

describe('cache related flags from core', () => {
beforeEach((done) => {
if (isWindows) return;

rimraf(path.join(__dirname, '../../node_modules/.cache/webpack/*'), () => {
done();
});
});

it('should be successful with --cache ', () => {
const { stderr, stdout } = run(__dirname, ['--cache']);
expect(stderr).toBeFalsy();
Expand Down

0 comments on commit 65107da

Please sign in to comment.