Skip to content

Commit 64a231d

Browse files
committed
use a port for the tests that doesn't collide with common local server ports
1 parent 0438dd6 commit 64a231d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Diff for: test/unit/docsify.test.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ const handler = require('serve-handler');
77
const { expect } = require('chai');
88
const { initJSDOM } = require('../_helper');
99

10-
const docsifySite = 'http://127.0.0.1:3000';
10+
const port = 9753;
11+
const docsifySite = 'http://127.0.0.1:' + port;
1112

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

33-
await new Promise(r => server.listen(3000, r));
34+
await new Promise(r => server.listen(port, r));
3435
});
3536

3637
after(async () => {

0 commit comments

Comments
 (0)