Skip to content

Commit 003c927

Browse files
committed
feat/addSockPath
1 parent 58d1682 commit 003c927

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

lib/utils/createConfig.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ function createConfig(config, argv, { port }) {
3030
options.socket = argv.socket;
3131
}
3232

33+
if (argv.sockPath) {
34+
options.sockPath = argv.sockPath;
35+
}
36+
3337
if (argv.sockPort) {
3438
options.sockPort = argv.sockPort;
3539
}

test/cli.test.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,17 @@ describe('CLI', () => {
5959
.catch(done);
6060
});
6161

62+
it('--sockPath', (done) => {
63+
runDevServer('--sockPath /mysockPath')
64+
.then((output) => {
65+
expect(
66+
output.stdout.includes('http://localhost&sockPath=/mysockPath')
67+
).toEqual(true);
68+
done();
69+
})
70+
.catch(done);
71+
});
72+
6273
it('--color', (done) => {
6374
runDevServer('--color')
6475
.then((output) => {

0 commit comments

Comments
 (0)