Skip to content

Commit

Permalink
Fix type
Browse files Browse the repository at this point in the history
  • Loading branch information
kasperpeulen committed Oct 31, 2023
1 parent 4647e9f commit 1c00b8c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions code/lib/test/src/expect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ import {
import * as matchers from '@testing-library/jest-dom/matchers';
import type { PromisifyObject } from './utils';

type Matchers<T> = PromisifyObject<JestAssertion<T>> &
matchers.TestingLibraryMatchers<ReturnType<ExpectStatic['stringContaining']>, Promise<void>>;

// We only expose the jest compatible API for now
export interface Assertion<T>
extends PromisifyObject<JestAssertion<T>>,
matchers.TestingLibraryMatchers<ReturnType<ExpectStatic['stringContaining']>, Promise<void>> {
export interface Assertion<T> extends Matchers<T> {
toHaveBeenCalledOnce(): Promise<void>;
toSatisfy<E>(matcher: (value: E) => boolean, message?: string): Promise<void>;
resolves: Assertion<T>;
Expand Down

0 comments on commit 1c00b8c

Please sign in to comment.