-
-
Notifications
You must be signed in to change notification settings - Fork 59
Open
Description
As discovered while working on this PR, here are the issues to document the limitations around augmentation usage.
See the augmentation issue for Jasmine there #1893
Jest
- As documented here and demonstrated in this project, we can utilize Jest with
@jest/globalsand@types/jestto use Jest's expect with wdio augmentation, but it is not a plug-and-play, out-of-the-box solution. - As shown here, to use Jest’s augmentation, we also need to register the wdio custom matcher manually.
- Additionally, to utilize the soft assertion service, we need to register it, as shown here.
- The typing
@types/jestis not offered and supported by Jest’s maintainer, and there is a long-standing issue around that here to get rid of@types/jest - When using Jest’s augmentation of the wdio matchers
toMatchSnapshotandtoMatchInlineSnapshot, they conflict with one of Jest’s. - A workaround to avoid requiring the registration of the wdio matcher & soft assertion is to force the
global.expect(as shown here) to be one of the wdio options, but this could also break other parts of a monorepo project.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels