Skip to content

Commit

Permalink
cant use the lsof command in CI :(
Browse files Browse the repository at this point in the history
  • Loading branch information
blainekasten committed Mar 31, 2020
1 parent 39d05a4 commit 133a6ab
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions integration-tests/gatsby-cli/__tests__/develop.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,10 @@ describe(`gatsby develop`, () => {
// 2. Wait for the build process to finish
await timeout(10)

// 3. Get the process identifier for what is running on port 8000
const res = spawn.sync("lsof", ["-i", ":8000", "-t"])
const portPID = Number(/\d+/.exec(res.output?.toString())[0])

// 4. kill the `gatsby develop` command so we can get logs
// 3. kill the `gatsby develop` command so we can get logs
spawn.sync("kill", [childProcess.pid])

// 5. Make sure the process we started was the one on gatsby port
expect(portPID).toEqual(childProcess.pid)

// 6. Make sure logs for the user contain expected results
// 4. Make sure logs for the user contain expected results
const logs = getLogs()
logs.should.contain(`success open and validate gatsby-configs`)
logs.should.contain(`success load plugins`)
Expand Down

0 comments on commit 133a6ab

Please sign in to comment.