http4s-munit icon indicating copy to clipboard operation
http4s-munit copied to clipboard

Compare the results of two api calls

Open listba opened this issue 11 months ago • 1 comments

I would like to call two different api routes and then make an assertion that relies on values from the results of both calls, however I don't see any way to nest or call two separate routes and retain the results for both unless I'm missing something.

ie something like this

test(GET(uri"routeA")).and(GET(uri"routeB")) { (responseA,responseB) =>
   ......
  assertEquals(resultA.field, resultB.field)
}

listba avatar Mar 20 '24 19:03 listba

Hey @listba, sorry, but that is something the library doesn't allow doing at the moment 😞. I'll be happy to review a PR that adds that functionality though 😊

alejandrohdezma avatar Mar 21 '24 11:03 alejandrohdezma