Skip to content

Commit

Permalink
add some logs to gatsby-cli integration tests for debugging stalling …
Browse files Browse the repository at this point in the history
…tests
  • Loading branch information
pieh committed Oct 20, 2022
1 parent c84d663 commit 281ee9d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions integration-tests/gatsby-cli/test-helpers/invoke-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export const GatsbyCLI = {
? `development`
: `production`
try {
console.log(`starting`, args)
const results = sync(
process.execPath,
[gatsbyBinLocation].concat(args),
Expand All @@ -44,11 +45,13 @@ export const GatsbyCLI = {
env: { NODE_ENV, CI: 1, GATSBY_LOGGER: `ink` },
}
)
console.log(`finished`, args, results)
return [
results.exitCode,
createLogsMatcher(strip(results.stdout.toString())),
]
} catch (err) {
console.log(`error`, err)
return [
err.exitCode,
createLogsMatcher(strip(err.stdout?.toString() || ``)),
Expand Down

0 comments on commit 281ee9d

Please sign in to comment.