Skip to content

Commit

Permalink
#56 Correct import and typo
Browse files Browse the repository at this point in the history
  • Loading branch information
SandraBergstrom committed Jul 4, 2023
1 parent 2aeea27 commit d6992a7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/mocks/handlers.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
const baseUrl = "https://travel-tickr-api-e57198555b47.herokuapp.com/";
import { rest } from "msw";

const baseURL = "https://travel-tickr-api-e57198555b47.herokuapp.com/";

export const handlers = [
rest.get(`${baseURL}dj-rest-auth/user/`, (req, res, ctx) => {
Expand All @@ -15,7 +17,7 @@ export const handlers = [
})
);
}),
rest.post(`${baseURL}dj-res-auth/logout/`, (req, res, ctx) => {
rest.post(`${baseURL}dj-rest-auth/logout/`, (req, res, ctx) => {
return res(ctx.status(200));
}),
];
2 changes: 1 addition & 1 deletion src/setupTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// expect(element).toHaveTextContent(/react/i)
// learn more: https://github.com/testing-library/jest-dom
import "@testing-library/jest-dom";
import { setupServer } from "msw/handlers";
import { setupServer } from "msw/node";
import { handlers } from "./mocks/handlers";

const server = setupServer(...handlers);
Expand Down

0 comments on commit d6992a7

Please sign in to comment.