Skip to content

test: disable warning for vm.constants.USE_MAIN_CONTEXT_DEFAULT_LOADER#20845

Merged
mdjermanovic merged 1 commit into
mainfrom
suppress-warning-in-test
May 7, 2026
Merged

test: disable warning for vm.constants.USE_MAIN_CONTEXT_DEFAULT_LOADER#20845
mdjermanovic merged 1 commit into
mainfrom
suppress-warning-in-test

Conversation

@fasttime

@fasttime fasttime commented May 6, 2026

Copy link
Copy Markdown
Member

Prerequisites checklist

AI acknowledgment

  • I did not use AI to generate this PR.
  • (If the above is not checked) I have reviewed the AI-generated content before submitting.

What is the purpose of this pull request? (put an "X" next to an item)

[ ] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofix to a rule
[ ] Add a CLI option
[ ] Add something to the core
[X] Other, please explain:
Fix test output

Currently, the output of the npm test script is broken because of an experimental warning that occurs in a unit test:

> eslint@10.3.0 test
> node Makefile.js test

Validating rules
Running unit tests

  [....................................](node:13399) ExperimentalWarning: vm.USE_MAIN_CONTEXT_DEFAULT_LOADER is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
  [▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬]

  38129 passing (32s)
  11 pending


=============================== Coverage summary ===============================
Statements   : 99.26% ( 98126/98852 )
Branches     : 98.32% ( 16548/16830 )
Functions    : 99.46% ( 3512/3531 )
Lines        : 99.26% ( 98126/98852 )
================================================================================
Fuzzing rules [==============================] 100%, 0.9s elapsed, eta 0.0s, errors so far: 0
Validating licenses

The same warning also occurs in CI, although it's not visually disruptive. See for example https://github.com/eslint/eslint/actions/runs/25459450974/job/74697563703#step:5:10.

The purpose of this PR is to remove the warning from the test output:

> eslint@10.3.0 test
> node Makefile.js test

Validating rules
Running unit tests

  [▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬]

  38129 passing (33s)
  11 pending


=============================== Coverage summary ===============================
Statements   : 99.26% ( 98126/98852 )
Branches     : 98.32% ( 16550/16832 )
Functions    : 99.46% ( 3512/3531 )
Lines        : 99.26% ( 98126/98852 )
================================================================================
Fuzzing rules [==============================] 100%, 1.0s elapsed, eta 0.0s, errors so far: 0
Validating licenses

What changes did you make? (Give an overview)

Updated a unit test to suppress the experimental warning.

Is there anything you'd like reviewers to focus on?

@github-project-automation github-project-automation Bot moved this to Needs Triage in Triage May 6, 2026
@eslint-github-bot eslint-github-bot Bot added the chore This change is not user-facing label May 6, 2026
@netlify

netlify Bot commented May 6, 2026

Copy link
Copy Markdown

Deploy Preview for docs-eslint canceled.

Name Link
🔨 Latest commit 466e56b
🔍 Latest deploy log https://app.netlify.com/projects/docs-eslint/deploys/69fbbc6705388300086c120a

@fasttime
fasttime marked this pull request as ready for review May 7, 2026 05:40
@fasttime
fasttime requested a review from a team as a code owner May 7, 2026 05:40

@mdjermanovic mdjermanovic left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thanks!

@mdjermanovic
mdjermanovic merged commit 0dd1f9f into main May 7, 2026
43 checks passed
@mdjermanovic
mdjermanovic deleted the suppress-warning-in-test branch May 7, 2026 06:56
@github-project-automation github-project-automation Bot moved this from Needs Triage to Complete in Triage May 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore This change is not user-facing

Projects

Status: Complete

Development

Successfully merging this pull request may close these issues.

2 participants