Skip to content

Allow passing type arguments to ability matchers like .tobeCallableWith() #592

@webJose

Description

@webJose

The following works:

function testFn(payload: { data: string }) { }

expect(testFn).type.tobeCallableWith({ data: "test" });

However, the generic overload doesn't work:

function testFn(payload: { data: string }) { }

expect<typeof testFn>().type.tobeCallableWith({ data: "test" });

The latter, when executed throws this error: Error: A type argument for 'Source' must be a callable type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions