Like .use functions as a prepend is there any way to add a .postpend? #2155
-
Relatively new to MSW so I may just get this flat out wrong in terms of trying to use the tool. So I figured id ask to try and get some context on why im wrong if I am or if the improvement could be useful. I have a msw that is set up before a test runs that returns Since I think if .use is functioning as a prepend and MSW goes through the handlers right to left. if i put the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi, @rcuching. That's a good question.
You have a few options here. Option 1:
|
Beta Was this translation helpful? Give feedback.
Hi, @rcuching. That's a good question.
.use()
always prepends request handlers because the order of handlers matters. There is no way to "push" handlers (add to the end) and I don't believe there's ever a reason to do so.You have a few options here.
Option 1:
server.use()
in individualdescribe()
blocksDon't forget to reset the overrides you add with