Skip to content

Commit

Permalink
feat/addSockPath (#1804)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangyuang authored and hiroppy committed Apr 19, 2019
1 parent e395a96 commit da907f9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/utils/createConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ function createConfig(config, argv, { port }) {
options.socket = argv.socket;
}

if (argv.sockPath) {
options.sockPath = argv.sockPath;
}

if (argv.sockPort) {
options.sockPort = argv.sockPort;
}
Expand Down
11 changes: 11 additions & 0 deletions test/cli.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,17 @@ describe('CLI', () => {
.catch(done);
});

it('--sockPath', (done) => {
runDevServer('--sockPath /mysockPath')
.then((output) => {
expect(
output.stdout.includes('http://localhost&sockPath=/mysockPath')
).toEqual(true);
done();
})
.catch(done);
});

it('--color', (done) => {
runDevServer('--color')
.then((output) => {
Expand Down

0 comments on commit da907f9

Please sign in to comment.