-
-
Notifications
You must be signed in to change notification settings - Fork 60
Open
Description
Soft assertions currently have three limitations:
- It does not support basic matchers like
toBeortoEqualfrom theexpectlibrary, but only custom matchers of wdio. This line is related. - If we support the above, the current implementation uses
awaitby default, which is not required when called for basic matchers. See this code line. When using Jasmine augmentation, the soft assertions method is not available in the typing. See jasmine.d.ts
- Also, if jasmine is used as the global ambient
softis not working vs if we import expect fromexpect-webdriverio. However, this is potentially a@wdio/jasmine-frameworkor@wdio/local-runnerbugs and not one fromexpect-webdriverio
To expand a bit
matchersfromimport { matchers } from './index.js'only contains custom matcher. Removing it allows us to expand to more matchers, but also removes "the checks"- Depending on whether the matcher is expecting
voidorPromise<void>, we should somehow fork the code to await or not. However, how can we achieve that? - See the two screenshots below taken using this project: https://github.com/dprevost-LMI/jasmine-boilerplate/tree/test-latest-expect-webdriverio_jasmine-expectAsync
When Jasmine is the global ambient, the functions are not registered when used with @wdio/jasmine-framework and @wdio/local-runner, and globally, we need to explicitly use import { expect } from 'expect-webdriverio' to have it working

Unavailable typing on jasmine augmentation (maybe something we do not want to support, though)

Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels