You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running component tests in WebdriverIO, users can partially mock a module like:
mock('./foo-bar-baz.js',async(originalModule)=>{// Mock the default export and named export 'foo'// and propagate named export from the original modulereturn{__esModule: true,
...originalModule,default: fn(()=>'mocked baz'),foo: 'mocked foo',}})
It seems though that the type for originalModule is wrong and defined as () => Promise<originalModule>.
What is your expected behavior?
Fix the type.
How to reproduce the bug.
n/a
Relevant log output
n/a
Code of Conduct
I agree to follow this project's Code of Conduct
Is there an existing issue for this?
I have searched the existing issues
The text was updated successfully, but these errors were encountered:
Have you read the Contributing Guidelines on issues?
WebdriverIO Version
latest
Node.js Version
LTS
Mode
WDIO Testrunner
Which capabilities are you using?
What happened?
When running component tests in WebdriverIO, users can partially mock a module like:
It seems though that the type for
originalModule
is wrong and defined as() => Promise<originalModule>
.What is your expected behavior?
Fix the type.
How to reproduce the bug.
n/a
Relevant log output
Code of Conduct
Is there an existing issue for this?
The text was updated successfully, but these errors were encountered: