Skip to content

test_runner: fixed test object is incorrectly passed to setup() - #50982

Merged
nodejs-github-bot merged 5 commits into
nodejs:mainfrom
pulkit-30:fix-48809
Dec 24, 2023
Merged

test_runner: fixed test object is incorrectly passed to setup()#50982
nodejs-github-bot merged 5 commits into
nodejs:mainfrom
pulkit-30:fix-48809

Conversation

@pulkit-30

@pulkit-30pulkit-30 commented Nov 30, 2023

Copy link
Copy Markdown
Contributor

Fix#48809

pass testStream to setup instead testRoot.

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/test_runner

@nodejs-github-botnodejs-github-bot added needs-ci PRs that need a full CI run. test_runner Issues and PRs related to the test runner subsystem. labels Nov 30, 2023
Comment threadlib/internal/test_runner/utils.js Outdated
@pulkit-30
pulkit-30 marked this pull request as ready for review December 3, 2023 12:36

@rluvatonrluvaton 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.

Can you please add a test

Comment threadtest/parallel/test-runner-run.mjs Outdated
Comment threadtest/parallel/test-runner-run.mjs Outdated
Comment threadtest/parallel/test-runner-run.mjs Outdated

@rluvatonrluvaton 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.

Well done! thanks

@rluvatonrluvaton added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Dec 4, 2023
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 4, 2023
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@pulkit-30
pulkit-30 requested a review from MoLowDecember 4, 2023 15:29

@MoLowMoLow 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.

this PR causes a regression:
running a simple test file:

consttest=require("node:test");test("a",()=>console.log(1));

on main console is printed with colors
image

but on this branch the colors are discarded:
image

I am working on fixing the test that should have caught this

@pulkit-30

Copy link
Copy Markdown
ContributorAuthor

this PR causes a regression:
running a simple test file:

I was also suspecting something, but surprised by the tests 😅

@pulkit-30

Copy link
Copy Markdown
ContributorAuthor

converting this PR to draft. ref: #51064, still working on it 🚀

@pulkit-30
pulkit-30 marked this pull request as draft December 6, 2023 01:51
@pulkit-30
pulkit-30 marked this pull request as ready for review December 6, 2023 17:01
@pulkit-30
pulkit-30 requested a review from MoLowDecember 11, 2023 15:49
Comment threadtest/parallel/test-runner-run.mjs Outdated
Comment threadlib/internal/test_runner/utils.js Outdated

@MoLowMoLow 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.

createWriteStream is called multiple times for each reporter destination, and in some cases the writeStream is never being closed

Comment threadlib/internal/test_runner/utils.js Outdated
Comment threadlib/internal/test_runner/harness.js Outdated
Comment threadlib/internal/test_runner/runner.js Outdated
@pulkit-30
pulkit-30 requested a review from MoLowDecember 15, 2023 16:50
@pulkit-30

Copy link
Copy Markdown
ContributorAuthor

@MoLow PTAL.

@MoLowMoLow added request-ci Add this label to start a Jenkins CI on a PR. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. labels Dec 23, 2023
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 23, 2023
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@MoLowMoLow added the commit-queue Add this label to land a pull request using GitHub Actions. label Dec 24, 2023
@nodejs-github-botnodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Dec 24, 2023
@nodejs-github-bot
nodejs-github-bot merged commit dad666a into nodejs:mainDec 24, 2023
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Landed in dad666a

@MoLow

Copy link
Copy Markdown
Member

@pulkit-30 thanks for the hard work 🎉

@pulkit-30

Copy link
Copy Markdown
ContributorAuthor

@pulkit-30 thanks for the hard work 🎉

Thanks a ton! It means a lot.

RafaelGSS pushed a commit that referenced this pull request Jan 2, 2024
PR-URL: #50982
Reviewed-By: Raz Luvaton <rluvaton@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
@RafaelGSSRafaelGSS mentioned this pull request Jan 2, 2024
@koshic

Copy link
Copy Markdown

@MoLow do you plan to backport it to 20.x? Documentation is still incorrect - https://nodejs.org/docs/latest-v20.x/api/test.html#runoptions.

@MoLow

Copy link
Copy Markdown
Member

not every PR needs a manual backport. lets wait for @nodejs/releasers to release a new v20 version and request a backport if needed

richardlau pushed a commit that referenced this pull request Mar 25, 2024
PR-URL: #50982
Reviewed-By: Raz Luvaton <rluvaton@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
@richardlaurichardlau mentioned this pull request Mar 25, 2024
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.commit-queue-squashAdd this label to instruct the Commit Queue to squash all the PR commits into the first one.needs-ciPRs that need a full CI run.test_runnerIssues and PRs related to the test runner subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test_runner: test object is incorrectly passed to setup()

6 participants

@pulkit-30@nodejs-github-bot@MoLow@koshic@ljharb@rluvaton