Skip to content
This repository has been archived by the owner on Sep 7, 2020. It is now read-only.

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
MoOx committed Oct 27, 2016
1 parent b2697ad commit 5c6b03c
Showing 1 changed file with 17 additions and 14 deletions.
31 changes: 17 additions & 14 deletions e2e-tests/__tests__/cli-arg-port.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ import {

it("should NOT throw if port is used",
() => new Promise((resolve, reject) => {
let child
const app = require("express")()
const server = app.listen(3333, (err) => {
if (err) {
reject(err)
}

const child = exec(
child = exec(
`${ phenomic } start --open=false --devPort=3333`, execOpts,

(err) => {
Expand All @@ -24,18 +25,20 @@ it("should NOT throw if port is used",
}
}
)

// server need to be killed manually
const timeout = setTimeout(() => {
console.log("********** CLOSIINGGGGG*************")
console.log("********** CLOSIINGGGGG*************")
console.log("********** CLOSIINGGGGG*************")
console.log("********** CLOSIINGGGGG*************")
console.log("********** CLOSIINGGGGG*************")
console.log("********** CLOSIINGGGGG*************")
server.close()
child.kill("SIGKILL")
resolve()
}, timing)
})

// server need to be killed manually
const timeout = setTimeout(() => {
console.log("********** CLOSIINGGGGG*************")
console.log("********** CLOSIINGGGGG*************")
console.log("********** CLOSIINGGGGG*************")
console.log("********** CLOSIINGGGGG*************")
console.log("********** CLOSIINGGGGG*************")
console.log("********** CLOSIINGGGGG*************")
console.log(server.close())
if (child) {
console.log(child.kill("SIGKILL"))
}
resolve()
}, timing)
}), maxTimeout)

0 comments on commit 5c6b03c

Please sign in to comment.