AngelaE / ts-mountebank

Mountebank client for TS / node
15 stars 5 forks source link

feat: adding withQuery into the predicate #16

Closed efr-chriswilliams closed 2 years ago

efr-chriswilliams commented 2 years ago

We found that there was no handling in the Predicate to pass querystrings, so added it.

...

  new EqualPredicate()
    .withMethod(HttpMethod.GET)
    .withPath('/users')
    .withQuery({ sortFormat: true, limit: 5 })

...
AngelaE commented 2 years ago

Apologies that it took me so long to respond. I added the query string to the FlexiPredicate, that also supports the 'equal' comparison. The 'EqualPredicate' is just there for backwards compatibility. See PR https://github.com/AngelaE/ts-mountebank/pull/18 - and in particular commit https://github.com/AngelaE/ts-mountebank/commit/7633e806cfbc4cd2c2fb93629e7d7c0756070816

Closing because I think the functionality is now available.