Skip to content

Integrate toHaveBeenCalledBefore and toHaveBeenCalledAfter to core #6045

@Barbapapazes

Description

@Barbapapazes

Clear and concise description of the problem

Hello,

Knowing when a mock is called relatively to another is very useful to ensure implementation order is correct. Actually, these is no expect function to know that. Do you thing it could be possible to add some or have you any recommanded way to check that a mock vi.fn is called before or after another one.

Suggested solution

Integrate https://github.com/jest-community/jest-extended/blob/main/src/matchers/toHaveBeenCalledBefore.js to core of vitest.

Alternative

No response

Additional context

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Approved

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions