teremock icon indicating copy to clipboard operation
teremock copied to clipboard

More flexible predicate for interceptors

Open Diokuz opened this issue 4 years ago • 2 comments

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
  }
}

Diokuz avatar Feb 18 '20 11:02 Diokuz

I would also like to add a predicate by body

boris-chernysh avatar Oct 24 '20 09:10 boris-chernysh

#27 issue is related also

anru avatar Oct 07 '21 04:10 anru