Skip to content
This repository was archived by the owner on Jul 30, 2024. It is now read-only.
This repository was archived by the owner on Jul 30, 2024. It is now read-only.

Support Regex for url #17

@Mojo1

Description

@Mojo1

cy.intercept accepts as url type RouteMatcher
Maybe you could do it as well because id like to better not rely on the example id for path params
better have a regex. In my case it's uuid for example

Additional to this:
cy.mockWithOpenAPI({ url: '/accounts/d3a98f9b-03c6-4bca-89e5-aac492a98f71/messages' }).as('messages');

this:
cy.mockWithOpenAPI({ url: new RegExp( /accounts/${UUID_REGEX}/messages).as('messages');

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