Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More flexible predicate for interceptors #4

Open
Diokuz opened this issue Feb 18, 2020 · 2 comments
Open

More flexible predicate for interceptors #4

Diokuz opened this issue Feb 18, 2020 · 2 comments

Comments

@Diokuz
Copy link
Owner

Diokuz commented Feb 18, 2020

The case: mock a request, which have no applicationId query parameter.

Probably, teremock should support functional predicates, e.g.

const interceptor = {
  url: 'example.com',
  predicate({ query, url }) {
    return !query.applicationId
  }
}
@boris-chernysh
Copy link

I would also like to add a predicate by body

@anru
Copy link
Contributor

anru commented Oct 7, 2021

#27 issue is related also

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants