Skip to content

Commit

Permalink
fix npm internal exit code test [run ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
AtofStryker committed Aug 23, 2024
1 parent e64d330 commit ada1bcc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/server/test/integration/cli_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,14 @@ describe('CLI Interface', () => {
/**
* In certain versions of npm, code with an exit code of 10 (Internal Runtime Javascript Failure)
* is ultimately displayed as an exit code of 1 (Uncaught Runtime Exception).
* This seems to occur before Node 7 / NPM 4 and after Node 14/ NPM 7.
* This seems to occur before Node 7 / NPM 4 and between Node 14/ NPM 7 and Node 16 / NPM 8.
* Please see https://github.com/arzzen/all-exit-error-codes/blob/master/programming-languages/javascript/nodejs.md
* for more details.
*
* @returns {boolean}
*/
const doesNpmObscureInternalExitCode = () => {
return semver.lt(npmVersion, '4.0.0') || semver.gt(npmVersion, '6.0.0')
return semver.lt(npmVersion, '4.0.0') || (semver.gt(npmVersion, '6.0.0') && semver.lt(npmVersion, '8.0.0'))
}

beforeEach(() => {
Expand Down

0 comments on commit ada1bcc

Please sign in to comment.