-
-
Notifications
You must be signed in to change notification settings - Fork 58
Open
Description
Soft assertions currently have three limitations:
- It does not support basic matchers like
toBe
ortoEqual
from theexpect
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 fromexpect-webdriverio
. However, this is potentially a@wdio/jasmine-framework
or@wdio/local-runner
bugs and not one fromexpect-webdriverio
To expand a bit
matchers
fromimport { 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
orPromise<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)
Metadata
Metadata
Assignees
Labels
No labels