Skip to content

Commit

Permalink
[test] Unskip test on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
lpinca committed Aug 5, 2020
1 parent aae1388 commit e6795bb
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions test/websocket-server.test.js
Expand Up @@ -114,17 +114,15 @@ describe('WebSocketServer', () => {
});
});

it('uses a precreated http server listening on unix socket', function (done) {
//
// Skip this test on Windows as it throws errors for obvious reasons.
//
if (process.platform === 'win32') return this.skip();

it('uses a precreated http server listening on unix socket', (done) => {
const server = http.createServer();
const sockPath = path.join(
os.tmpdir(),
`ws.${crypto.randomBytes(16).toString('hex')}.sock`
);
const sockPath =
process.platform !== 'win32'
? path.join(
os.tmpdir(),
`ws.${crypto.randomBytes(16).toString('hex')}.sock`
)
: '//.pipe/ws';

server.listen(sockPath, () => {
const wss = new WebSocket.Server({ server });
Expand Down

0 comments on commit e6795bb

Please sign in to comment.