Closed garethgeorge closed 1 year ago
🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use automerge
label. Good luck human!
-- conventional-commit-lint bot https://conventionalcommits.org/
No testing at the moment, it's unclear how we should approach testing this (beyond local exploratory testing). We don't have process lifecycle tests specific to node.js and mocha doesn't support this type of test.
I think we could possibly try to add a test that simulates emitting the event, I'm also fine with relying on exploratory tests and our conformance test coverage which should be exercising the full process lifecycle. WDYT?
Despite the Node.js docs indicating that the exit code should always be a number it seems this is unchecked and, in fact,
process.exit
may be called with a string value.Verified experimentally:
Some Cloud Function users report errors on shutdown when either their code or a dependency calls process.exit with a string value. To account for this the exit code check is updated to use string comparison to account for the possibility of a string exit code.