Open JamesTrickeyD opened 4 years ago
transform.responseBody doesn't seem to work in react native
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 }); })
// Run test and returned log body === "bye"
// Run test and returned log body === "hello"
It this lib still active? (Sorry not being rude - genuine question)
Description
transform.responseBody doesn't seem to work in react native
Steps to Reproduce
IN REACT NATIVE:
Expected Result
// Run test and returned log body === "bye"
Actual Result
Additional Context
// Run test and returned log body === "hello"