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: fix mock.method to support class instances #45608

Merged
merged 19 commits into from
Dec 17, 2022

Conversation

ErickWendel
Copy link
Member

@ErickWendel ErickWendel commented Nov 24, 2022

It fixes a problem when trying to spy a method from a class instance or static functions on a class instance.

Working example:

import { mock } from 'node:test'
class Runner {
  static async someTask(msg) {
    return Promise.resolve(msg);
  }

  static async method(msg) {
    await this.someTask(msg);
    return msg;
  }
}
mock.method(Runner, Runner.someTask.name);
await Runner.method('ok')
console.log('calls', {
  length: Runner.someTask.mock.calls.length,
  result: await Runner.someTask.mock.calls[0].result,
  arguments: Runner.someTask.mock.calls[0].arguments
});
// calls { length: 1, result: 'ok', arguments: [ 'ok' ] }

and

import { mock } from 'node:test'
class Runner {
  async someTask(msg) {
    return Promise.resolve(msg);
  }

  async method(msg) {
    await this.someTask(msg);
    return msg;
  }
}
const runner = new Runner()
mock.method(runner, runner.someTask.name);
await runner.method('ok')
console.log('calls', {
  length: runner.someTask.mock.calls.length,
  result: await runner.someTask.mock.calls[0].result,
  arguments: runner.someTask.mock.calls[0].arguments
});
// calls { length: 1, result: 'ok', arguments: [ 'ok' ] }

This also makes sure that null Objects and inexisting methods are verified

@nodejs-github-bot nodejs-github-bot added dont-land-on-v14.x needs-ci PRs that need a full CI run. test_runner Issues and PRs related to the test runner subsystem. labels Nov 24, 2022
@ErickWendel ErickWendel added needs-ci PRs that need a full CI run. dont-land-on-v14.x and removed needs-ci PRs that need a full CI run. dont-land-on-v14.x labels Nov 24, 2022
@ErickWendel
Copy link
Member Author

I haven't removed those labels, so I added them manually. Not sure if that's a problem

lib/internal/test_runner/mock.js Outdated Show resolved Hide resolved
lib/internal/test_runner/mock.js Outdated Show resolved Hide resolved
@ErickWendel ErickWendel force-pushed the test/test-mock-on-classes branch 3 times, most recently from 2442f87 to f076bf2 Compare November 24, 2022 16:09
@ErickWendel ErickWendel self-assigned this Nov 24, 2022
@ErickWendel ErickWendel changed the title test: fix mock.method to suport class instances test: fix mock.method to support class instances Nov 24, 2022
@aduh95 aduh95 changed the title test: fix mock.method to support class instances test_runner: fix mock.method to support class instances Nov 24, 2022
@aduh95
Copy link
Contributor

aduh95 commented Nov 24, 2022

/cc @nodejs/test_runner

lib/internal/test_runner/mock.js Outdated Show resolved Hide resolved
lib/internal/test_runner/mock.js Outdated Show resolved Hide resolved
lib/internal/test_runner/mock.js Outdated Show resolved Hide resolved
test/parallel/test-runner-mocking.js Outdated Show resolved Hide resolved
test/parallel/test-runner-mocking.js Outdated Show resolved Hide resolved
test/parallel/test-runner-mocking.js Show resolved Hide resolved
test/parallel/test-runner-mocking.js Show resolved Hide resolved
test/parallel/test-runner-mocking.js Show resolved Hide resolved
@ErickWendel ErickWendel force-pushed the test/test-mock-on-classes branch 4 times, most recently from 66939bc to 45b3bd4 Compare November 30, 2022 19:38
lib/internal/test_runner/mock.js Outdated Show resolved Hide resolved
test/parallel/test-runner-mocking.js Outdated Show resolved Hide resolved
test/parallel/test-runner-mocking.js Show resolved Hide resolved
lib/internal/test_runner/mock.js Outdated Show resolved Hide resolved
lib/internal/test_runner/mock.js Outdated Show resolved Hide resolved
ErickWendel and others added 5 commits December 6, 2022 16:41
It fixes a problem when trying to spy a method
from a class instance or static functions
on a class instance
Co-authored-by: Yagiz Nizipli <yagiz@nizipli.com>
Signed-off-by: Erick Wendel <erick.workspace@gmail.com>
Signed-off-by: Erick Wendel <erick.workspace@gmail.com>
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@aduh95 aduh95 added the commit-queue Add this label to land a pull request using GitHub Actions. label Dec 17, 2022
@nodejs-github-bot nodejs-github-bot added commit-queue-failed An error occurred while landing this pull request using GitHub Actions. and removed commit-queue Add this label to land a pull request using GitHub Actions. labels Dec 17, 2022
@nodejs-github-bot
Copy link
Collaborator

Commit Queue failed
- Loading data for nodejs/node/pull/45608
✔  Done loading data for nodejs/node/pull/45608
----------------------------------- PR info ------------------------------------
Title      test_runner: fix mock.method to support class instances (#45608)
   ⚠  Could not retrieve the email or name of the PR author's from user's GitHub profile!
Branch     ErickWendel:test/test-mock-on-classes -> nodejs:main
Labels     needs-ci, dont-land-on-v14.x, test_runner
Commits    19
 - test: fix mock.method to support class instances
 - added suggestions
 - test: remove unecessarly if
 - test: drop comments and rename tests
 - test_runner: ensure that mock.method works with class inheritance
 - test: ensure that the original object was reseted after execution
 - test_runner: added aduh95's suggestion to extend null
 - test_runner: remote proto.name validation on mock
 - test: fix lint
 - test_runner: added cjihrig suggestions to turn fns private
 - test_runner: validate properties in objects
 - test_runner: add colin's suggestion to simplify algorithm on mock
 - test_runner: turn fn into inline if
 - test_runner: when method doesnt exists it shows a message
 - add aduh95 suggestion test/parallel/test-runner-mocking.js
 - test: assert by code instead of regex string
 - test_runner: rename object
 - test_runner: add test case to check prototype chain
 - test: assert property descriptors
Committers 2
 - Erick Wendel 
 - GitHub 
PR-URL: https://github.com/nodejs/node/pull/45608
Reviewed-By: Colin Ihrig 
Reviewed-By: Yagiz Nizipli 
Reviewed-By: Benjamin Gruenbaum 
Reviewed-By: Antoine du Hamel 
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/45608
Reviewed-By: Colin Ihrig 
Reviewed-By: Yagiz Nizipli 
Reviewed-By: Benjamin Gruenbaum 
Reviewed-By: Antoine du Hamel 
--------------------------------------------------------------------------------
   ℹ  This PR was created on Thu, 24 Nov 2022 15:50:52 GMT
   ✔  Approvals: 4
   ✔  - Colin Ihrig (@cjihrig) (TSC): https://github.com/nodejs/node/pull/45608#pullrequestreview-1208727810
   ✔  - Yagiz Nizipli (@anonrig): https://github.com/nodejs/node/pull/45608#pullrequestreview-1210162552
   ✔  - Benjamin Gruenbaum (@benjamingr): https://github.com/nodejs/node/pull/45608#pullrequestreview-1218042726
   ✔  - Antoine du Hamel (@aduh95) (TSC): https://github.com/nodejs/node/pull/45608#pullrequestreview-1221781107
   ✔  Last GitHub CI successful
   ℹ  Last Full PR CI on 2022-12-16T23:05:30Z: https://ci.nodejs.org/job/node-test-pull-request/48536/
- Querying data for job/node-test-pull-request/48536/
   ✔  Last Jenkins CI successful
--------------------------------------------------------------------------------
   ✔  No git cherry-pick in progress
   ✔  No git am in progress
   ✔  No git rebase in progress
--------------------------------------------------------------------------------
- Bringing origin/main up to date...
From https://github.com/nodejs/node
 * branch                  main       -> FETCH_HEAD
✔  origin/main is now up-to-date
- Downloading patch for 45608
From https://github.com/nodejs/node
 * branch                  refs/pull/45608/merge -> FETCH_HEAD
✔  Fetched commits as 8467aa2189ba..152539d4ac32
--------------------------------------------------------------------------------
Auto-merging lib/internal/test_runner/mock.js
Auto-merging test/parallel/test-runner-mocking.js
[main 8001bd86a3] test: fix mock.method to support class instances
 Author: Erick Wendel 
 Date: Thu Nov 24 12:40:41 2022 -0300
 2 files changed, 91 insertions(+), 9 deletions(-)
Auto-merging lib/internal/test_runner/mock.js
[main 424c586b99] added suggestions
 Author: Erick Wendel 
 Date: Thu Nov 24 13:06:15 2022 -0300
 1 file changed, 1 insertion(+), 1 deletion(-)
Auto-merging lib/internal/test_runner/mock.js
[main f38c70538c] test: remove unecessarly if
 Author: Erick Wendel 
 Date: Thu Nov 24 13:07:30 2022 -0300
 1 file changed, 2 insertions(+), 4 deletions(-)
Auto-merging lib/internal/test_runner/mock.js
Auto-merging test/parallel/test-runner-mocking.js
[main 8b64907e9b] test: drop comments and rename tests
 Author: Erick Wendel 
 Date: Wed Nov 30 14:35:19 2022 -0300
 2 files changed, 3 insertions(+), 3 deletions(-)
Auto-merging lib/internal/test_runner/mock.js
Auto-merging test/parallel/test-runner-mocking.js
[main 135db2319d] test_runner: ensure that mock.method works with class inheritance
 Author: Erick Wendel 
 Date: Wed Nov 30 16:09:01 2022 -0300
 2 files changed, 61 insertions(+), 9 deletions(-)
Auto-merging test/parallel/test-runner-mocking.js
[main e9f77ae6a5] test: ensure that the original object was reseted after execution
 Author: Erick Wendel 
 Date: Wed Nov 30 16:48:21 2022 -0300
 1 file changed, 3 insertions(+)
Auto-merging test/parallel/test-runner-mocking.js
[main 7925ccab4f] test_runner: added aduh95's suggestion to extend null
 Author: Erick Wendel 
 Date: Tue Dec 6 16:47:38 2022 -0300
 1 file changed, 3 insertions(+), 1 deletion(-)
Auto-merging lib/internal/test_runner/mock.js
[main fa9ff865b3] test_runner: remote proto.name validation on mock
 Author: Erick Wendel 
 Date: Tue Dec 6 16:56:33 2022 -0300
 1 file changed, 2 insertions(+), 1 deletion(-)
Auto-merging test/parallel/test-runner-mocking.js
[main ca940b4ceb] test: fix lint
 Author: Erick Wendel 
 Date: Tue Dec 6 16:57:25 2022 -0300
 1 file changed, 1 insertion(+), 2 deletions(-)
Auto-merging lib/internal/test_runner/mock.js
[main 1a379f41b3] test_runner: added cjihrig suggestions to turn fns private
 Author: Erick Wendel 
 Date: Tue Dec 6 17:09:17 2022 -0300
 1 file changed, 34 insertions(+), 33 deletions(-)
Auto-merging lib/internal/test_runner/mock.js
Auto-merging test/parallel/test-runner-mocking.js
[main b492956cec] test_runner: validate properties in objects
 Author: Erick Wendel 
 Date: Tue Dec 6 18:05:47 2022 -0300
 3 files changed, 29 insertions(+), 1 deletion(-)
Auto-merging lib/internal/test_runner/mock.js
[main adeaffce4c] test_runner: add colin's suggestion to simplify algorithm on mock
 Author: Erick Wendel 
 Date: Tue Dec 6 18:19:47 2022 -0300
 1 file changed, 33 insertions(+), 34 deletions(-)
Auto-merging lib/internal/test_runner/mock.js
[main 49a10932dd] test_runner: turn fn into inline if
 Author: Erick Wendel 
 Date: Wed Dec 7 13:04:50 2022 -0300
 1 file changed, 10 insertions(+), 15 deletions(-)
Auto-merging lib/internal/test_runner/mock.js
Auto-merging test/parallel/test-runner-mocking.js
[main 6d50eaa1f7] test_runner: when method doesnt exists it shows a message
 Author: Erick Wendel 
 Date: Wed Dec 7 13:09:05 2022 -0300
 3 files changed, 1 insertion(+), 22 deletions(-)
Auto-merging test/parallel/test-runner-mocking.js
[main f704e888b6] add aduh95 suggestion test/parallel/test-runner-mocking.js
 Author: Erick Wendel 
 Date: Mon Dec 12 10:16:34 2022 -0300
 1 file changed, 1 insertion(+), 1 deletion(-)
Auto-merging test/parallel/test-runner-mocking.js
[main b61151430b] test: assert by code instead of regex string
 Author: Erick Wendel 
 Date: Mon Dec 12 10:40:37 2022 -0300
 1 file changed, 1 insertion(+), 5 deletions(-)
Auto-merging lib/internal/test_runner/mock.js
[main 891199c137] test_runner: rename object
 Author: Erick Wendel 
 Date: Mon Dec 12 11:58:58 2022 -0300
 1 file changed, 6 insertions(+), 6 deletions(-)
Auto-merging test/parallel/test-runner-mocking.js
[main 393888c454] test_runner: add test case to check prototype chain
 Author: Erick Wendel 
 Date: Tue Dec 13 12:14:38 2022 -0300
 1 file changed, 25 insertions(+)
Auto-merging test/parallel/test-runner-mocking.js
[main f90f0591e5] test: assert property descriptors
 Author: Erick Wendel 
 Date: Wed Dec 14 11:52:45 2022 -0300
 1 file changed, 16 insertions(+), 6 deletions(-)
   ✔  Patches applied
There are 19 commits in the PR. Attempting autorebase.
Rebasing (2/38)

Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
test: fix mock.method to support class instances

It fixes a problem when trying to spy a method
from a class instance or static functions
on a class instance

PR-URL: #45608
Reviewed-By: Colin Ihrig cjihrig@gmail.com
Reviewed-By: Yagiz Nizipli yagiz@nizipli.com
Reviewed-By: Benjamin Gruenbaum benjamingr@gmail.com
Reviewed-By: Antoine du Hamel duhamelantoine1995@gmail.com

[detached HEAD 1976cc4b50] test: fix mock.method to support class instances
Author: Erick Wendel erick.workspace@gmail.com
Date: Thu Nov 24 12:40:41 2022 -0300
2 files changed, 91 insertions(+), 9 deletions(-)
Rebasing (3/38)
Rebasing (4/38)

Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
added suggestions

Co-authored-by: Yagiz Nizipli yagiz@nizipli.com
PR-URL: #45608
Reviewed-By: Colin Ihrig cjihrig@gmail.com
Reviewed-By: Yagiz Nizipli yagiz@nizipli.com
Reviewed-By: Benjamin Gruenbaum benjamingr@gmail.com
Reviewed-By: Antoine du Hamel duhamelantoine1995@gmail.com

[detached HEAD 278d22ee47] added suggestions
Author: Erick Wendel erick.workspace@gmail.com
Date: Thu Nov 24 13:06:15 2022 -0300
1 file changed, 1 insertion(+), 1 deletion(-)
Rebasing (5/38)
Rebasing (6/38)

Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
test: remove unecessarly if

Signed-off-by: Erick Wendel erick.workspace@gmail.com
PR-URL: #45608
Reviewed-By: Colin Ihrig cjihrig@gmail.com
Reviewed-By: Yagiz Nizipli yagiz@nizipli.com
Reviewed-By: Benjamin Gruenbaum benjamingr@gmail.com
Reviewed-By: Antoine du Hamel duhamelantoine1995@gmail.com

[detached HEAD 225ec6cea3] test: remove unecessarly if
Author: Erick Wendel erick.workspace@gmail.com
Date: Thu Nov 24 13:07:30 2022 -0300
1 file changed, 2 insertions(+), 4 deletions(-)
Rebasing (7/38)
Rebasing (8/38)

Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
test: drop comments and rename tests

Signed-off-by: Erick Wendel erick.workspace@gmail.com
PR-URL: #45608
Reviewed-By: Colin Ihrig cjihrig@gmail.com
Reviewed-By: Yagiz Nizipli yagiz@nizipli.com
Reviewed-By: Benjamin Gruenbaum benjamingr@gmail.com
Reviewed-By: Antoine du Hamel duhamelantoine1995@gmail.com

[detached HEAD 9f286ccd25] test: drop comments and rename tests
Author: Erick Wendel erick.workspace@gmail.com
Date: Wed Nov 30 14:35:19 2022 -0300
2 files changed, 3 insertions(+), 3 deletions(-)
Rebasing (9/38)
Rebasing (10/38)

Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
test_runner: ensure that mock.method works with class inheritance

PR-URL: #45608
Reviewed-By: Colin Ihrig cjihrig@gmail.com
Reviewed-By: Yagiz Nizipli yagiz@nizipli.com
Reviewed-By: Benjamin Gruenbaum benjamingr@gmail.com
Reviewed-By: Antoine du Hamel duhamelantoine1995@gmail.com

[detached HEAD fc672be081] test_runner: ensure that mock.method works with class inheritance
Author: Erick Wendel erick.workspace@gmail.com
Date: Wed Nov 30 16:09:01 2022 -0300
2 files changed, 61 insertions(+), 9 deletions(-)
Rebasing (11/38)
Rebasing (12/38)

Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
test: ensure that the original object was reseted after execution

PR-URL: #45608
Reviewed-By: Colin Ihrig cjihrig@gmail.com
Reviewed-By: Yagiz Nizipli yagiz@nizipli.com
Reviewed-By: Benjamin Gruenbaum benjamingr@gmail.com
Reviewed-By: Antoine du Hamel duhamelantoine1995@gmail.com

[detached HEAD 4d916d06f5] test: ensure that the original object was reseted after execution
Author: Erick Wendel erick.workspace@gmail.com
Date: Wed Nov 30 16:48:21 2022 -0300
1 file changed, 3 insertions(+)
Rebasing (13/38)
Rebasing (14/38)

Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
test_runner: added aduh95's suggestion to extend null

PR-URL: #45608
Reviewed-By: Colin Ihrig cjihrig@gmail.com
Reviewed-By: Yagiz Nizipli yagiz@nizipli.com
Reviewed-By: Benjamin Gruenbaum benjamingr@gmail.com
Reviewed-By: Antoine du Hamel duhamelantoine1995@gmail.com

[detached HEAD c157d38933] test_runner: added aduh95's suggestion to extend null
Author: Erick Wendel erick.workspace@gmail.com
Date: Tue Dec 6 16:47:38 2022 -0300
1 file changed, 3 insertions(+), 1 deletion(-)
Rebasing (15/38)
Rebasing (16/38)

Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
test_runner: remote proto.name validation on mock

PR-URL: #45608
Reviewed-By: Colin Ihrig cjihrig@gmail.com
Reviewed-By: Yagiz Nizipli yagiz@nizipli.com
Reviewed-By: Benjamin Gruenbaum benjamingr@gmail.com
Reviewed-By: Antoine du Hamel duhamelantoine1995@gmail.com

[detached HEAD c7f8bd543d] test_runner: remote proto.name validation on mock
Author: Erick Wendel erick.workspace@gmail.com
Date: Tue Dec 6 16:56:33 2022 -0300
1 file changed, 2 insertions(+), 1 deletion(-)
Rebasing (17/38)
Rebasing (18/38)

Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
test: fix lint

PR-URL: #45608
Reviewed-By: Colin Ihrig cjihrig@gmail.com
Reviewed-By: Yagiz Nizipli yagiz@nizipli.com
Reviewed-By: Benjamin Gruenbaum benjamingr@gmail.com
Reviewed-By: Antoine du Hamel duhamelantoine1995@gmail.com

[detached HEAD abf1644f81] test: fix lint
Author: Erick Wendel erick.workspace@gmail.com
Date: Tue Dec 6 16:57:25 2022 -0300
1 file changed, 1 insertion(+), 2 deletions(-)
Rebasing (19/38)
Rebasing (20/38)

Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
test_runner: added cjihrig suggestions to turn fns private

PR-URL: #45608
Reviewed-By: Colin Ihrig cjihrig@gmail.com
Reviewed-By: Yagiz Nizipli yagiz@nizipli.com
Reviewed-By: Benjamin Gruenbaum benjamingr@gmail.com
Reviewed-By: Antoine du Hamel duhamelantoine1995@gmail.com

[detached HEAD 176fd61c3e] test_runner: added cjihrig suggestions to turn fns private
Author: Erick Wendel erick.workspace@gmail.com
Date: Tue Dec 6 17:09:17 2022 -0300
1 file changed, 34 insertions(+), 33 deletions(-)
Rebasing (21/38)
Rebasing (22/38)

Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
test_runner: validate properties in objects

PR-URL: #45608
Reviewed-By: Colin Ihrig cjihrig@gmail.com
Reviewed-By: Yagiz Nizipli yagiz@nizipli.com
Reviewed-By: Benjamin Gruenbaum benjamingr@gmail.com
Reviewed-By: Antoine du Hamel duhamelantoine1995@gmail.com

[detached HEAD 31d1877be3] test_runner: validate properties in objects
Author: Erick Wendel erick.workspace@gmail.com
Date: Tue Dec 6 18:05:47 2022 -0300
3 files changed, 29 insertions(+), 1 deletion(-)
Rebasing (23/38)
Rebasing (24/38)

Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
test_runner: add colin's suggestion to simplify algorithm on mock

PR-URL: #45608
Reviewed-By: Colin Ihrig cjihrig@gmail.com
Reviewed-By: Yagiz Nizipli yagiz@nizipli.com
Reviewed-By: Benjamin Gruenbaum benjamingr@gmail.com
Reviewed-By: Antoine du Hamel duhamelantoine1995@gmail.com

[detached HEAD f97174867d] test_runner: add colin's suggestion to simplify algorithm on mock
Author: Erick Wendel erick.workspace@gmail.com
Date: Tue Dec 6 18:19:47 2022 -0300
1 file changed, 33 insertions(+), 34 deletions(-)
Rebasing (25/38)
Rebasing (26/38)

Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
test_runner: turn fn into inline if

Signed-off-by: Erick Wendel erick.workspace@gmail.com
PR-URL: #45608
Reviewed-By: Colin Ihrig cjihrig@gmail.com
Reviewed-By: Yagiz Nizipli yagiz@nizipli.com
Reviewed-By: Benjamin Gruenbaum benjamingr@gmail.com
Reviewed-By: Antoine du Hamel duhamelantoine1995@gmail.com

[detached HEAD 5dd0f2ceb3] test_runner: turn fn into inline if
Author: Erick Wendel erick.workspace@gmail.com
Date: Wed Dec 7 13:04:50 2022 -0300
1 file changed, 10 insertions(+), 15 deletions(-)
Rebasing (27/38)
Rebasing (28/38)

Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
test_runner: when method doesnt exists it shows a message

PR-URL: #45608
Reviewed-By: Colin Ihrig cjihrig@gmail.com
Reviewed-By: Yagiz Nizipli yagiz@nizipli.com
Reviewed-By: Benjamin Gruenbaum benjamingr@gmail.com
Reviewed-By: Antoine du Hamel duhamelantoine1995@gmail.com

[detached HEAD 957f686e11] test_runner: when method doesnt exists it shows a message
Author: Erick Wendel erick.workspace@gmail.com
Date: Wed Dec 7 13:09:05 2022 -0300
3 files changed, 1 insertion(+), 22 deletions(-)
Rebasing (29/38)
Rebasing (30/38)

Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
add aduh95 suggestion test/parallel/test-runner-mocking.js

Co-authored-by: Antoine du Hamel duhamelantoine1995@gmail.com
PR-URL: #45608
Reviewed-By: Colin Ihrig cjihrig@gmail.com
Reviewed-By: Yagiz Nizipli yagiz@nizipli.com
Reviewed-By: Benjamin Gruenbaum benjamingr@gmail.com
Reviewed-By: Antoine du Hamel duhamelantoine1995@gmail.com

[detached HEAD c8c691a361] add aduh95 suggestion test/parallel/test-runner-mocking.js
Author: Erick Wendel erick.workspace@gmail.com
Date: Mon Dec 12 10:16:34 2022 -0300
1 file changed, 1 insertion(+), 1 deletion(-)
Rebasing (31/38)
Rebasing (32/38)

Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
test: assert by code instead of regex string

PR-URL: #45608
Reviewed-By: Colin Ihrig cjihrig@gmail.com
Reviewed-By: Yagiz Nizipli yagiz@nizipli.com
Reviewed-By: Benjamin Gruenbaum benjamingr@gmail.com
Reviewed-By: Antoine du Hamel duhamelantoine1995@gmail.com

[detached HEAD c24a9cb1f0] test: assert by code instead of regex string
Author: Erick Wendel erick.workspace@gmail.com
Date: Mon Dec 12 10:40:37 2022 -0300
1 file changed, 1 insertion(+), 5 deletions(-)
Rebasing (33/38)
Rebasing (34/38)

Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
test_runner: rename object

Signed-off-by: Erick Wendel erick.workspace@gmail.com
PR-URL: #45608
Reviewed-By: Colin Ihrig cjihrig@gmail.com
Reviewed-By: Yagiz Nizipli yagiz@nizipli.com
Reviewed-By: Benjamin Gruenbaum benjamingr@gmail.com
Reviewed-By: Antoine du Hamel duhamelantoine1995@gmail.com

[detached HEAD 76e142c1f8] test_runner: rename object
Author: Erick Wendel erick.workspace@gmail.com
Date: Mon Dec 12 11:58:58 2022 -0300
1 file changed, 6 insertions(+), 6 deletions(-)
Rebasing (35/38)
Rebasing (36/38)

Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
test_runner: add test case to check prototype chain

Signed-off-by: Erick Wendel erick.workspace@gmail.com
PR-URL: #45608
Reviewed-By: Colin Ihrig cjihrig@gmail.com
Reviewed-By: Yagiz Nizipli yagiz@nizipli.com
Reviewed-By: Benjamin Gruenbaum benjamingr@gmail.com
Reviewed-By: Antoine du Hamel duhamelantoine1995@gmail.com

[detached HEAD 9d31711721] test_runner: add test case to check prototype chain
Author: Erick Wendel erick.workspace@gmail.com
Date: Tue Dec 13 12:14:38 2022 -0300
1 file changed, 25 insertions(+)
Rebasing (37/38)
Rebasing (38/38)

Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
test: assert property descriptors

PR-URL: #45608
Reviewed-By: Colin Ihrig cjihrig@gmail.com
Reviewed-By: Yagiz Nizipli yagiz@nizipli.com
Reviewed-By: Benjamin Gruenbaum benjamingr@gmail.com
Reviewed-By: Antoine du Hamel duhamelantoine1995@gmail.com

[detached HEAD 1403a3ef26] test: assert property descriptors
Author: Erick Wendel erick.workspace@gmail.com
Date: Wed Dec 14 11:52:45 2022 -0300
1 file changed, 16 insertions(+), 6 deletions(-)

Successfully rebased and updated refs/heads/main.

ℹ Add commit-queue-squash label to land the PR as one commit, or commit-queue-rebase to land as separate commits.

https://github.com/nodejs/node/actions/runs/3719734467

@cjihrig cjihrig added commit-queue Add this label to land a pull request using GitHub Actions. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. and removed commit-queue-failed An error occurred while landing this pull request using GitHub Actions. labels Dec 17, 2022
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Dec 17, 2022
@nodejs-github-bot nodejs-github-bot merged commit 929aada into nodejs:main Dec 17, 2022
@nodejs-github-bot
Copy link
Collaborator

Landed in 929aada

targos pushed a commit that referenced this pull request Jan 1, 2023
It fixes a problem when trying to spy a method
from a class instance or static functions
on a class instance

PR-URL: #45608
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
@RafaelGSS RafaelGSS mentioned this pull request Jan 2, 2023
MoLow pushed a commit to MoLow/node that referenced this pull request Jan 26, 2023
It fixes a problem when trying to spy a method
from a class instance or static functions
on a class instance

PR-URL: nodejs#45608
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
MoLow pushed a commit to MoLow/node that referenced this pull request Jan 26, 2023
It fixes a problem when trying to spy a method
from a class instance or static functions
on a class instance

PR-URL: nodejs#45608
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
@MoLow MoLow added the backport-open-v18.x Indicate that the PR has an open backport. label Jan 26, 2023
juanarbol pushed a commit that referenced this pull request Jan 26, 2023
It fixes a problem when trying to spy a method
from a class instance or static functions
on a class instance

PR-URL: #45608
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
@MoLow MoLow removed the backport-open-v18.x Indicate that the PR has an open backport. label Jan 26, 2023
@juanarbol juanarbol mentioned this pull request Jan 28, 2023
MoLow pushed a commit to MoLow/node-core-test that referenced this pull request Feb 2, 2023
It fixes a problem when trying to spy a method
from a class instance or static functions
on a class instance

PR-URL: nodejs/node#45608
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
(cherry picked from commit 929aada39d0f418193ca03cc360ced8c5b4ce553)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. needs-ci PRs that need a full CI run. 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