Soft assertions currently have three limitations:
- It does not support basic matchers like
toBe or toEqual from the expect library, but only custom matchers of wdio. This line is related.
- If we support the above, the current implementation uses
await by 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
soft is not working vs if we import expect from expect-webdriverio. However, this is potentially a @wdio/jasmine-framework or @wdio/local-runner bugs and not one from expect-webdriverio
To expand a bit
matchers from import { 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
void or Promise<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)

Soft assertions currently have three limitations:
toBeortoEqualfrom theexpectlibrary, but only custom matchers of wdio. This line is related.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.tssoftis not working vs if we import expect fromexpect-webdriverio. However, this is potentially a@wdio/jasmine-frameworkor@wdio/local-runnerbugs and not one fromexpect-webdriverioTo 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"voidorPromise<void>, we should somehow fork the code to await or not. However, how can we achieve that?When Jasmine is the global ambient, the functions are not registered when used with

@wdio/jasmine-frameworkand@wdio/local-runner, and globally, we need to explicitly useimport { expect } from 'expect-webdriverio'to have it workingUnavailable typing on jasmine augmentation (maybe something we do not want to support, though)
