Description
transform.responseBody doesn't seem to work in react native
Steps to Reproduce
IN REACT NATIVE:
beforeAll(() => {
const responseHeaders = {
"content-type": "application/json",
};
unmock.on();
unmock
.nock(baseUrlForPayment, "AUTHENTICATION_ENDPOINT")
.post(ENDPOINTS.AUTHENTICATION)
.reply(
200,
{
test: "hello",
}
)
authenticationEndpoint = unmock.services["AUTHENTICATION_ENDPOINT"];
});
describe("startAuthenticationSaga", () => {
describe("when server returns 200", () => {
it("should respond appropriately to an authentication failure", async () => {
authenticationEndpoint.state(
transform.responseBody("test").const("bye"),
);
// Run test and returned log body
});
})
Expected Result
// Run test and returned log body === "bye"
Actual Result
Additional Context
// Run test and returned log body === "hello"