File tree Expand file tree Collapse file tree
test-types/jest/customMatchers Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- // TODO dprevost should we review this to have the wdio namespace or maybe the expect namespace?
2- // Name jest is required to augment the jest.Matchers interface
3- declare namespace jest {
1+ declare namespace ExpectWebdriverIO {
2+
3+ // TODO dprevost: ensure we still allow custom asymmetric matchers
44 interface AsymmetricMatchers {
55 toBeCustom ( ) : void ;
66 }
Original file line number Diff line number Diff line change @@ -695,6 +695,15 @@ declare namespace ExpectWebdriverIO {
695695 * Some properties are omitted for the type check to work correctly.
696696 */
697697 type PartialMatcher < T > = Omit < ExpectLibAsymmetricMatcher < T > , 'sample' | 'inverse' | '$$typeof' >
698+
699+ //TODO dprevost: ensure we do not break custom AsymmetricMatchers from expect library
700+ // declare global {
701+ // namespace ExpectWebdriverIO {
702+ // interface AsymmetricMatchers {
703+ // myCustomMatcher(value: string): ExpectWebdriverIO.PartialMatcher;
704+ // }
705+ // }
706+ // }
698707}
699708
700709declare module 'expect-webdriverio' {
You can’t perform that action at this time.
0 commit comments