Skip to content

[Question] Mocking the same endpoint multiple times in one test #5747

@nirbenya

Description

@nirbenya

So my scenario is this:
I wanna mock an endpoint multiple times.
for example: '/api/v1/auth/user' will return with status 401 on the first time it's get called, but on the second time it's get called I wanna get a a different response (let's say with status 200).
While I'm able to mock the first call successfully using route.fulfill, I didn't find a way to override it on the second call.
Didn't find any documentation on the docs or on the web about it.

Is it even possible?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions