-
Notifications
You must be signed in to change notification settings - Fork 248
Use node-portfinder to avoid error when port is used #340
Conversation
if (err) { | ||
log(err) | ||
|
||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not throw?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was there before. You like throw. I'll do it.
May be we should add integration test for this. Cause coverage is decreasing. |
Sure. On it |
How do you know about that ? |
You add code that is not tested :) |
@@ -38,10 +38,38 @@ test.cb("should NOT throw if a CLI flag is recognized", (t) => { | |||
) | |||
|
|||
// ...or be ok quickly | |||
// (so we assume it's ok and kill the process, we don't need the actual build) | |||
// (so we assume it"s ok and kill the process, we don"t need the actual build) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
‘ (alt + ')
@MoOx integration-tests was not run |
const timeout = setTimeout(() => { | ||
t.pass() | ||
t.end() | ||
child.kill() | ||
}, 500) | ||
}) | ||
|
||
test.cb("should NOT throw if port is used", (t) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should, not "should NOT" ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hum ok nvm.
c19b9ce
to
caaf59f
Compare
@MoOx can you have a look at the integration-tests ? original tests in that file aren't killed. |
@@ -7,7 +7,7 @@ import { exec } from "child_process" | |||
const asyncExec = asyncify(exec) | |||
|
|||
const target = join(__dirname, "..", "test-boilerplate") | |||
const execOpts = { cwd: target } | |||
const execOpts = { cwd: target, stdio: "inherit" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please don't do that. This can pollute test output.
Blocked by #346 |
7eac5a8
to
3e033ba
Compare
No idea. I'll take a look |
All tests passed on local |
Same here, local tests ok. |
I can't print the log even with inherit |
woot. 5432 seems to be used by travis, I tried with 8081, and tests are ok on travis. |
I cleaned this PR, waiting for tests. |
Haha. Nice. |
Close #320