Skip to content

Commit b2bcdb0

Browse files
hiroppyevilebottnawi
authored andcommitted
test(Proxy): skip Proxy.test.js (#1667)
This test is unstable when running on Node v11 on MacOS.
1 parent b92e5fd commit b2bcdb0

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

test/Proxy.test.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const express = require('express');
66
const WebSocket = require('ws');
77
const helper = require('./helper');
88
const config = require('./fixtures/proxy-config/webpack.config');
9+
const shouldSkipTestSuite = require('./shouldSkipTestSuite');
910

1011
const WebSocketServer = WebSocket.Server;
1112
const contentBase = path.join(__dirname, 'fixtures/proxy-config');
@@ -62,6 +63,11 @@ function startProxyServers() {
6263
}
6364

6465
describe('Proxy', () => {
66+
// issue: https://github.com/webpack/webpack-dev-server/pull/1633#issuecomment-463938675
67+
if (shouldSkipTestSuite()) {
68+
return;
69+
}
70+
6571
describe('proxy options is a object', () => {
6672
let server;
6773
let req;

test/shouldSkipTestSuite.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
'use strict';
2+
3+
const semver = require('semver');
4+
5+
// issue: https://github.com/nodejs/node/issues/24835
6+
function shouldSkipTestSuite() {
7+
if (
8+
semver.satisfies(process.version, '11') &&
9+
process.platform === 'darwin'
10+
) {
11+
it('skip', () => {
12+
expect(true).toBeTruthy();
13+
});
14+
15+
return true;
16+
}
17+
return false;
18+
}
19+
20+
module.exports = shouldSkipTestSuite;

0 commit comments

Comments
 (0)