Skip to content

Commit

Permalink
Try again
Browse files Browse the repository at this point in the history
  • Loading branch information
JesseNaser committed Apr 14, 2024
1 parent d0de430 commit 86c8af9
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion tests/functions/api/username.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { onRequestGet, getSessionIdFromRequest } from "functions/api/username";
import { onRequestGet, getSessionIdFromRequest } from "./api/username";
import { jest } from "@jest/globals";

const createMockRequest = (cookie = "") => ({
Expand Down
2 changes: 1 addition & 1 deletion tests/functions/login.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { onRequestPost, responseForRetry } from "functions/login";
import { onRequestPost, responseForRetry } from "./login";
import { jest } from "@jest/globals";
import { pbkdf2Sync } from "node:crypto";

Expand Down
6 changes: 3 additions & 3 deletions tests/functions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
"transform": {},
"verbose": true,
"testEnvironment": "node",
"moduleNameMapper": {
"^functions/(.*)$": "<rootDir>/functions/$1.js"
}
"moduleNameMapper": {
"^(\\.{1,2}/.*)\\.js$": "<rootDir>/functions/$1"
}
},
"devDependencies": {
"jest": "^29.4.3",
Expand Down
2 changes: 1 addition & 1 deletion tests/functions/signout.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { onRequest, redirectToLogin } from "functions/signout";
import { onRequest, redirectToLogin } from "./signout";
import { jest } from "@jest/globals";

function createMockRequest(cookies = "") {
Expand Down
2 changes: 1 addition & 1 deletion tests/functions/signup.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ describe("onRequestPost", () => {
},
};

const { onRequestPost } = await import("functions/signup");
const { onRequestPost } = await import("./signup");

const result = await onRequestPost({ request, env });

Expand Down

0 comments on commit 86c8af9

Please sign in to comment.