Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

deokjinkim
Copy link
Contributor

@deokjinkim deokjinkim commented Sep 7, 2023

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
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
@@ -508,7 +508,7 @@ class MockTimers {
);
}

validateArray(timers, 'timers');
validateStringArray(timers, 'timers');
Copy link
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
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
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

doc/api/test.md Outdated Show resolved Hide resolved
@deokjinkim
Copy link
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
Collaborator

@lpinca
Copy link
Member

lpinca commented Jan 27, 2024

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
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
Collaborator

@aduh95
Copy link
Contributor

aduh95 commented Jan 30, 2024

@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
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@deokjinkim
Copy link
Contributor Author

This needs a rebase.

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

Copy link
Contributor

@aduh95 aduh95 left a comment

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?

doc/api/test.md Outdated
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks unrelateed, should this land as a separate PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I created a separate PR for document change.
Refs: #52969

deokjinkim added a commit to deokjinkim/node that referenced this pull request May 13, 2024
Some timer values such as `setImmediate` and `clearImmediate` are
missed. And `milliseconds` which is argument of `timers.tick()`
is optional and default is 1.

Refs: nodejs#49534 (comment)
`apis` which is argument of `timers.enable()` is string array.
So use `validatStringArray` instead of `validateArray`. And
`options` is optional, so update JSDoc.
@deokjinkim
Copy link
Contributor Author

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

Thank you for review. I added a test you mentioned :)

@aduh95 aduh95 added the semver-major PRs that contain breaking changes and should be released in the next major version. label May 14, 2024
@deokjinkim deokjinkim added the request-ci Add this label to start a Jenkins CI on a PR. label May 14, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label May 14, 2024
nodejs-github-bot pushed a commit that referenced this pull request May 15, 2024
Some timer values such as `setImmediate` and `clearImmediate` are
missed. And `milliseconds` which is argument of `timers.tick()`
is optional and default is 1.

Refs: #49534 (comment)
PR-URL: #52969
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
targos pushed a commit that referenced this pull request May 21, 2024
Some timer values such as `setImmediate` and `clearImmediate` are
missed. And `milliseconds` which is argument of `timers.tick()`
is optional and default is 1.

Refs: #49534 (comment)
PR-URL: #52969
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
EliphazBouye pushed a commit to EliphazBouye/node that referenced this pull request Jun 20, 2024
Some timer values such as `setImmediate` and `clearImmediate` are
missed. And `milliseconds` which is argument of `timers.tick()`
is optional and default is 1.

Refs: nodejs#49534 (comment)
PR-URL: nodejs#52969
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
bmeck pushed a commit to bmeck/node that referenced this pull request Jun 22, 2024
Some timer values such as `setImmediate` and `clearImmediate` are
missed. And `milliseconds` which is argument of `timers.tick()`
is optional and default is 1.

Refs: nodejs#49534 (comment)
PR-URL: nodejs#52969
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
marco-ippolito pushed a commit that referenced this pull request Jul 19, 2024
Some timer values such as `setImmediate` and `clearImmediate` are
missed. And `milliseconds` which is argument of `timers.tick()`
is optional and default is 1.

Refs: #49534 (comment)
PR-URL: #52969
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
marco-ippolito pushed a commit that referenced this pull request Jul 19, 2024
Some timer values such as `setImmediate` and `clearImmediate` are
missed. And `milliseconds` which is argument of `timers.tick()`
is optional and default is 1.

Refs: #49534 (comment)
PR-URL: #52969
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
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. semver-major PRs that contain breaking changes and should be released in the next major version. test_runner Issues and PRs related to the test runner subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants