test: fix mock.method to support class instances · nodejs/node@97868be · GitHub
Skip to content

Commit 97868be

Browse files
ErickWendeltargos
authored andcommitted
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>
1 parent 71056da commit 97868be

2 files changed

Lines changed: 176 additions & 6 deletions

File tree

lib/internal/test_runner/mock.js

Lines changed: 25 additions & 5 deletions

test/parallel/test-runner-mocking.js

Lines changed: 151 additions & 1 deletion

0 commit comments

Comments
 (0)