Skip to content

Commit

Permalink
use a port for the tests that doesn't collide with common local serve…
Browse files Browse the repository at this point in the history
…r ports
  • Loading branch information
trusktr committed Jun 10, 2020
1 parent 0438dd6 commit 64a231d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/unit/docsify.test.js
Expand Up @@ -7,7 +7,8 @@ const handler = require('serve-handler');
const { expect } = require('chai');
const { initJSDOM } = require('../_helper');

const docsifySite = 'http://127.0.0.1:3000';
const port = 9753;
const docsifySite = 'http://127.0.0.1:' + port;

const markup = /* html */ `<!DOCTYPE html>
<html>
Expand All @@ -30,7 +31,7 @@ describe('Docsify public API', () => {
return handler(request, response);
});

await new Promise(r => server.listen(3000, r));
await new Promise(r => server.listen(port, r));
});

after(async () => {
Expand Down

0 comments on commit 64a231d

Please sign in to comment.