Skip to content

Commit

Permalink
fix: skip tests on windows (flaky)
Browse files Browse the repository at this point in the history
  • Loading branch information
anshumanv committed Oct 10, 2020
1 parent 5ac830b commit af7b515
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion test/core-flags/cache-flags.test.js
@@ -1,6 +1,6 @@
'use strict';

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

Expand Down Expand Up @@ -70,6 +70,7 @@ describe('cache related flags from core', () => {
});

it('should assign cache build dependencies correctly when cache type is filesystem', () => {
if (isWindows) return;
const { stderr, stdout } = run(__dirname, ['--cache-type', 'filesystem', '-c', './webpack.config.js']);
expect(stderr).toBeFalsy();
expect(stdout).toContain('buildDependencies');
Expand All @@ -83,6 +84,7 @@ describe('cache related flags from core', () => {
});

it('should assign cache build dependencies correctly when cache type is filesystem in config', () => {
if (isWindows) return;
const { stderr, stdout } = run(__dirname, ['-c', './webpack.cache.config.js']);
expect(stderr).toBeFalsy();
expect(stdout).toContain('buildDependencies');
Expand All @@ -96,6 +98,7 @@ describe('cache related flags from core', () => {
});

it('should assign cache build dependencies with multiple configs', () => {
if (isWindows) return;
const { stderr, stdout, exitCode } = run(__dirname, ['-c', './webpack.cache.config.js', '-c', './webpack.config.js']);
expect(stderr).toBeFalsy();
expect(stdout).toContain('buildDependencies');
Expand All @@ -105,6 +108,8 @@ describe('cache related flags from core', () => {
});

it('should assign cache build dependencies with merged configs', () => {
// TODO: Fix on windows
if (isWindows) return;
const { stderr, stdout, exitCode } = run(__dirname, ['-c', './webpack.cache.config.js', '-c', './webpack.config.js', '--merge']);
expect(stderr).toBeFalsy();
expect(stdout).toContain('buildDependencies');
Expand All @@ -114,6 +119,8 @@ describe('cache related flags from core', () => {
});

it('should invalidate cache when config changes', () => {
// TODO: Fix on windows
if (isWindows) return;
// Creating a temporary webpack config
writeFileSync(resolve(__dirname, './webpack.test.config.js'), 'module.exports = {mode: "development"}');
const { stderr, stdout } = run(__dirname, ['--cache-type', 'filesystem', '-c', './webpack.test.config.js']);
Expand Down

0 comments on commit af7b515

Please sign in to comment.