Skip to content

test: migrate console_assert message test to snapshot#62801

Open
galaxy4276 wants to merge 1 commit intonodejs:mainfrom
galaxy4276:test/migrate-console-assert-to-snapshot
Open

test: migrate console_assert message test to snapshot#62801
galaxy4276 wants to merge 1 commit intonodejs:mainfrom
galaxy4276:test/migrate-console-assert-to-snapshot

Conversation

@galaxy4276
Copy link
Copy Markdown

@galaxy4276 galaxy4276 commented Apr 18, 2026

Summary

Migrates test/message/console_assert from the legacy Python-based test runner (testcfg.py + .out file) to the modern JS snapshot approach.

Changes

  • Add test/fixtures/console/console_assert.js — the fixture script
    (same logic as the old test/message/console_assert.js, with the
    require path adjusted for the new location)
  • Add test/fixtures/console/console_assert.snapshot — expected output
  • Add console/console_assert.js entry to test-node-output-console.mjs
  • Remove test/message/console_assert.js and test/message/console_assert.out

What the test verifies

console.assert(false, Symbol('hello')) should print
Assertion failed Symbol(hello) to stderr without throwing or exiting.
The snapshot captures this expected output.

Refs: #47707

Test plan

  • node --test test/parallel/test-node-output-console.mjs passes
  • No other test/message/ tests affected

Migrate test/message/console_assert from the legacy Python-based
test runner to the JS snapshot approach used by
test-node-output-console.mjs.

The new fixture runs console.assert(false, Symbol('hello')) and
compares against a snapshot, removing the dependency on testcfg.py
and the .out file pattern.

Refs: nodejs#47707

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. labels Apr 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run. test Issues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants