diff --git a/projects/spectator/jest/src/lib/matchers-types.ts b/projects/spectator/jest/src/lib/matchers-types.ts index 6daa9c55..7afa788f 100644 --- a/projects/spectator/jest/src/lib/matchers-types.ts +++ b/projects/spectator/jest/src/lib/matchers-types.ts @@ -1,59 +1,59 @@ declare namespace jest { interface Matchers { - toExist(): boolean; + toExist(): R; - toHaveLength(expected: number): boolean; + toHaveLength(expected: number): R; - toHaveId(id: string | number): boolean; + toHaveId(id: string | number): R; - toHaveClass(className: string | string[], options?: { strict: boolean }): boolean; + toHaveClass(className: string | string[], options?: { strict: boolean }): R; - toHaveAttribute(attr: string | object, val?: string): boolean; + toHaveAttribute(attr: string | object, val?: string): R; - toHaveProperty(prop: string | object, val?: string | boolean): boolean; + toHaveProperty(prop: string | object, val?: string | boolean): R; - toContainProperty(prop: string | object, val?: string): boolean; + toContainProperty(prop: string | object, val?: string): R; - toHaveText(text: string | string[] | ((text: string) => boolean), exact?: boolean): boolean; + toHaveText(text: string | string[] | ((text: string) => boolean), exact?: boolean): R; - toContainText(text: string | string[] | ((text: string) => boolean), exact?: boolean): boolean; + toContainText(text: string | string[] | ((text: string) => boolean), exact?: boolean): R; - toHaveExactText(text: string | string[] | ((text: string) => boolean), options?: { trim: boolean }): boolean; + toHaveExactText(text: string | string[] | ((text: string) => boolean), options?: { trim: boolean }): R; - toHaveExactTrimmedText(text: string | string[] | ((text: string) => boolean)): boolean; + toHaveExactTrimmedText(text: string | string[] | ((text: string) => boolean)): R; - toHaveValue(value: string | string[]): boolean; + toHaveValue(value: string | string[]): R; - toContainValue(value: string | string[]): boolean; + toContainValue(value: string | string[]): R; - toHaveStyle(style: { [styleKey: string]: any }): boolean; + toHaveStyle(style: { [styleKey: string]: any }): R; - toHaveData({ data, val }: { data: string; val: string }): boolean; + toHaveData({ data, val }: { data: string; val: string }): R; - toBeChecked(): boolean; + toBeChecked(): R; - toBeIndeterminate(): boolean; + toBeIndeterminate(): R; - toBeDisabled(): boolean; + toBeDisabled(): R; - toBeEmpty(): boolean; + toBeEmpty(): R; - toBePartial(partial: object): boolean; + toBePartial(partial: object): R; - toBeHidden(): boolean; + toBeHidden(): R; - toBeSelected(): boolean; + toBeSelected(): R; - toBeVisible(): boolean; + toBeVisible(): R; - toBeFocused(): boolean; + toBeFocused(): R; - toBeMatchedBy(selector: string | Element): boolean; + toBeMatchedBy(selector: string | Element): R; - toHaveDescendant(selector: string | Element): boolean; + toHaveDescendant(selector: string | Element): R; - toHaveDescendantWithText({ selector, text }: { selector: string; text: string }): boolean; + toHaveDescendantWithText({ selector, text }: { selector: string; text: string }): R; - toHaveSelectedOptions(expected: string | string[] | HTMLOptionElement | HTMLOptionElement[]): boolean; + toHaveSelectedOptions(expected: string | string[] | HTMLOptionElement | HTMLOptionElement[]): R; } }