mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
test: Create single function for port generation
This reduces the chances of several integration tests re-using the same port.
This commit is contained in:
@@ -2,9 +2,10 @@ import type { Server } from 'http';
|
||||
import fetch from 'cross-fetch';
|
||||
import WebSocket from 'ws';
|
||||
import type { HttpServerFactory } from '../../src/server/HttpServerFactory';
|
||||
import { getPort } from '../util/Util';
|
||||
import { instantiateFromConfig } from './Config';
|
||||
|
||||
const port = 6001;
|
||||
const port = getPort('WebSocketsProtocol');
|
||||
const serverUrl = `http://localhost:${port}/`;
|
||||
const headers = { forwarded: 'host=example.pod;proto=https' };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user