Skip to content

test_runner: use validateStringArray for timers.enable()#49534

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
deokjinkim:230907_revise_mock_timers
Aug 19, 2024
Merged

test_runner: use validateStringArray for timers.enable()#49534
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
deokjinkim:230907_revise_mock_timers

Conversation

@deokjinkim

@deokjinkim deokjinkim commented Sep 7, 2023

Copy link
Copy Markdown
Contributor

apis which is argument of timers.enable() is string array. So use validatStringArray instead of validateArray. And
options is optional, so update JSDoc.
In document, some default value of timers are missed such as setImmediate and clearImmediate. Next, milliseconds which is argument of `timers.tick() is optional and default is 1.

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/test_runner

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test_runner Issues and PRs related to the test runner subsystem. labels Sep 7, 2023
}

validateArray(timers, 'timers');
validateStringArray(timers, 'timers');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I assume this is semver-major, correct? If so, can you please take it as its own PR?

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.

@aduh95 the MockTimers is currently experimental, I don't think we have to mark this as semver-major PRs that contain breaking changes and should be released in the next major version.

node/doc/api/test.md

Lines 1560 to 1568 in c86e700

## Class: `MockTimers`
<!-- YAML
added:
- v20.4.0
-->
> Stability: 1 - Experimental

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Actually I'm not sure this PR is semver-major or not. How about checking jenkins-ci's result according to below collaborator guide?

* `semver-{minor,major}`
* be conservative – that is, if a change has the remote _chance_ of breaking
something, go for semver-major
* when adding a semver label, add a comment explaining why you're adding it
* minor vs. patch: roughly: "does it add a new method / does it add a new
section to the docs"
* major vs. everything else: run last versions tests against this version, if
they pass, **probably** minor or patch

Comment thread doc/api/test.md Outdated
@deokjinkim

Copy link
Copy Markdown
Contributor Author

cc @ErickWendel PTAL when you are available.

@deokjinkim deokjinkim added the request-ci Add this label to start a Jenkins CI on a PR. label Sep 8, 2023
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Sep 8, 2023
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@lpinca

lpinca commented Jan 27, 2024

Copy link
Copy Markdown
Member

This needs a rebase.

@deokjinkim deokjinkim force-pushed the 230907_revise_mock_timers branch 2 times, most recently from ba15590 to 40e1c33 Compare January 29, 2024 14:16
@deokjinkim deokjinkim added the request-ci Add this label to start a Jenkins CI on a PR. label Jan 29, 2024
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jan 29, 2024
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@deokjinkim deokjinkim added the request-ci Add this label to start a Jenkins CI on a PR. label Jan 30, 2024
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jan 30, 2024
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@aduh95

aduh95 commented Jan 30, 2024

Copy link
Copy Markdown
Contributor

@deokjinkim please do not add request-ci Add this label to start a Jenkins CI on a PR. label on PRs that already have a running CI, it adds up unnecessary load to the CI infrastructure, and won't make the PR land sooner. At the very least, please cancel the running CI first.

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@deokjinkim

Copy link
Copy Markdown
Contributor Author

This needs a rebase.

@lpinca I rebased this PR. Could you review again?

@aduh95 aduh95 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you add a test that's failing on main and passing on this branch please?

Comment thread doc/api/test.md
@cjihrig cjihrig added the request-ci Add this label to start a Jenkins CI on a PR. label Aug 16, 2024
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 16, 2024
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@aduh95 aduh95 added experimental Issues and PRs related to experimental features. author ready PRs that have at least one approval, no pending requests for changes, and a CI started. and removed semver-major PRs that contain breaking changes and should be released in the next major version. labels Aug 17, 2024
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@cjihrig cjihrig added commit-queue Add this label to land a pull request using GitHub Actions. and removed needs-ci PRs that need a full CI run. labels Aug 19, 2024
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Aug 19, 2024
@nodejs-github-bot nodejs-github-bot merged commit 4f94397 into nodejs:main Aug 19, 2024
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Landed in 4f94397

@RafaelGSS RafaelGSS mentioned this pull request Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. experimental Issues and PRs related to experimental features. test_runner Issues and PRs related to the test runner subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants