Skip to content

Commit

Permalink
test: update net specialPort to -1
Browse files Browse the repository at this point in the history
  • Loading branch information
YOU54F committed Jun 24, 2024
1 parent 2d56e71 commit 309b996
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/common/net.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ chai.use(chaiAsPromised);
describe('Net', () => {
const port = 4567;
const defaultHost = '0.0.0.0';
const specialPort = process.platform.match('win') ? -1 : 80;
const specialPort = -1;

// Utility function to create a server on a given port and return a Promise
const createServer = (p: number, host = defaultHost) =>
Expand All @@ -26,9 +26,7 @@ describe('Net', () => {
});
});

(process.platform === 'linux' && process.arch === 'arm64'
? describe.skip
: describe)('#isPortAvailable', () => {
describe('#isPortAvailable', () => {
context('when the port is not allowed to be bound', () => {
it('returns a rejected promise', () =>
expect(isPortAvailable(specialPort, defaultHost)).to.eventually.be
Expand Down

0 comments on commit 309b996

Please sign in to comment.