Skip to content

Conversation

@Uzlopak
Copy link
Contributor

@Uzlopak Uzlopak commented Sep 15, 2025

we used process.exit sometimes in the past to disable test files. We should use skip option and not process.exit

This relates to...

Rationale

Changes

Features

Bug Fixes

Breaking Changes and Deprecations

Status

we used process.exit sometimes in the past to disable test files. We should use skip option and not process.exit
@Uzlopak Uzlopak requested a review from Copilot September 15, 2025 11:19
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR activates the ESLint rule n/no-process-exit to enforce better error handling practices by discouraging the use of process.exit() in favor of more appropriate alternatives like test skipping options or process.exitCode.

  • Activates the n/no-process-exit ESLint rule in the configuration
  • Replaces process.exit() calls with process.exitCode assignments where appropriate
  • Updates test files to use Node.js test runner's skip option instead of process.exit()

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
eslint.config.js Adds the n/no-process-exit rule to enforce better exit handling
test/interceptors/dump-interceptor.js Replaces process.exit with test skip option for Windows compatibility
test/autobahn/report.js Changes process.exit to process.exitCode assignment
test/autobahn/client.js Changes process.exit to process.exitCode assignment
test/web-platform-tests/wpt-runner.mjs Adds eslint-disable comment for legitimate process.exit usage
test/web-platform-tests/runner/test-runner.mjs Adds eslint-disable comments for legitimate process.exit usage
build/wasm.js Replaces one process.exit with throw statement, adds eslint-disable for legitimate usage
benchmarks/wait.js Changes process.exit to process.exitCode assignment

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mcollina mcollina merged commit 1913394 into main Sep 15, 2025
35 checks passed
@github-actions github-actions bot mentioned this pull request Jan 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants