Skip to content

Integrate toHaveBeenCalledBefore and toHaveBeenCalledAfter to core #6045

Closed

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

Activity

  1. added
    p2-nice-to-have
    and removed on Jul 8, 2024
  2. moved this to Approved in Team Boardon Oct 2, 2024
  3. locked and limited conversation to collaborators on Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    p2-nice-to-have

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions