Sitelet https://github.com/nodejs/node/issues/47707
Skip to content

message tests can be migrated from python to JS #47707

Description

@MoLow

See #47498 for an example of such a migration
pseudo-tty tests can migrate as well, but that will require some more work using something like https://github.com/microsoft/node-pty or similar

Activity

  1. added
    good first issueIssues that are suitable for first-time contributors.
    code-and-learnIssues related to the Code-and-Learn events and PRs submitted during the events.
    testIssues and PRs related to Node.js core tests and test infrastructure.
    on Apr 24, 2023
  2. MoLow commented on Apr 24, 2023

    @MoLow
    MemberAuthor

    @RafaelGSS is this a good candidate for Grace Hopper Open Source Day?

  3. projectnoa commented on Apr 25, 2023

    @projectnoa

    I would like to work on this if is available.

  4. MoLow commented on Apr 26, 2023

    @MoLow
    MemberAuthor

    @projectnoa no need to ask, this is an issue that many people can work on since there are many tests under tests/message.

  5. GeoffreyBooth commented on Apr 26, 2023

    @GeoffreyBooth
    Member

    @projectnoa no need to ask, this is an issue that many people can work on since there are many tests under tests/message.

    Yes. Please follow the example of #47498, and branch off of that PR’s branch so you get the new helpers that it adds. You might also want to add a comment on this thread letting others know which tests you plan to migrate, so that no one else works on the same ones while you do, duplicating effort.

  6. projectnoa commented on Apr 27, 2023

    @projectnoa

    Great! I'll dig into the project and mention what I'll tackle tomorrow.

  7. projectnoa commented on Apr 28, 2023

    @projectnoa

    Tests I will be working on:
    assert_throws_stack.js,
    assert_throws_stack.out,
    core_line_numbers.js,
    core_line_numbers.out,
    eval_messages.js,
    eval_messages.out,
    if-error-has-good-stack.js,
    if-error-has-good-stack.out,
    internal_assert.js,
    internal_assert.out,
    internal_assert_fail.js,
    internal_assert_fail.out,
    max_tick_depth.js,
    max_tick_depth.out,
    message.status,
    nexttick_throw.js,
    nexttick_throw.out,
    promise_unhandled_warn_with_error.js,
    promise_unhandled_warn_with_error.out,
    source_map_enclosing_function.js,
    source_map_enclosing_function.out,
    source_map_reference_error_tabs.js,
    source_map_reference_error_tabs.out,
    source_map_sourcemapping_url_string.js,
    source_map_sourcemapping_url_string.out,
    source_map_throw_catch.js,
    source_map_throw_catch.out,
    source_map_throw_icu.js,
    source_map_throw_icu.out,
    source_map_throw_set_immediate.js,
    source_map_throw_set_immediate.out,
    stdin_messages.js,
    stdin_messages.out,
    test-no-extra-info-on-fatal-exception.js,
    test-no-extra-info-on-fatal-exception.out,
    testcfg.py

  8. MoLow commented on Apr 28, 2023

    @MoLow
    MemberAuthor

    @projectnoa we try to avoid cookie licking, so if you have a ready PR just open one or multiple PRs

  9. mertcanaltin commented on Apr 28, 2023

    @mertcanaltin
    Member

    @MoLow I would love to help too

  10. MoLow commented on Apr 28, 2023

    @MoLow
    MemberAuthor

    @mertcanaltin go for it!

  11. projectnoa commented on Apr 28, 2023

    @projectnoa

    Apologies @MoLow, you were right. I didn't do my due diligence and jumped into the task without understanding the challenge ahead. I still want to do the work and contribute but I need to ask some questions.

    To my understanding, there's a set of unit tests in Python that need to be migrated to JS. I'm having trouble finding the Python tests. Can someone point me in the right direction?

    These tests will be residing in the test/message directory, correct? Are the message tests targeting a specific module or feature?

    What are the .out files in this directory?

    Also, the tests files I announced that I would work on are not the target of this operation. I should have paid attention a notice that they were tests already migrated. Apologies about that. I will instead focus on understanding the test workflow and see how I can start migrating a few tests.

    I was able to compile and run all current tests successfully, so I'm ready to work as soon as I can understand the test better.

    Thanks!

  12. GeoffreyBooth commented on Apr 29, 2023

    @GeoffreyBooth
    Member

    @projectnoa Once you’ve checked out the node repo and built, run

    tools/test.py -J --mode=release message

    To run all the message tests. At the moment, now that #47498 has landed there are only 26 left.

    These aren’t tests written in Python; they’re tests that are run by the Python script tools/test.py, but in a special way different from all the other tests in the Node codebase. The Python code runs all the .js files within test/message and compares their outputs against the matching .out files in the same folder, using a complicated regex pattern. Whenever the regex comparison fails, the test fails.

    We don’t want to have all this logic in Python, so we’ve been migrating the test/message tests to use a new pattern where the regex comparison is done in JavaScript; the #47498 PR created a new helper to do that comparison, and migrated a few dozen tests to use it. The work that remains is to migrate the rest of the message tests, following the example of #47498.

  13. added a commit that references this issue on May 5, 2023
  14. 75 remaining items

  15. github-actions commented on Jun 2, 2026

    @github-actions
    Contributor

    This issue has been marked as stale due to 210 days of inactivity.
    It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.

  16. added
    staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.
    on Jun 2, 2026
  17. github-actions commented on Jul 3, 2026

    @github-actions
    Contributor

    This issue has been automatically closed after 30 days of inactivity following its stale status (no activity for a total of 240 days).
    If this is still relevant, feel free to reopen it or leave a comment with additional details so we can continue the discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    code-and-learnIssues related to the Code-and-Learn events and PRs submitted during the events.good first issueIssues that are suitable for first-time contributors.staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.testIssues and PRs related to Node.js core tests and test infrastructure.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions