diff --git a/frontend/src/API/API.test.ts b/frontend/src/API/API.test.ts index e0a93f6..dbae706 100644 --- a/frontend/src/API/API.test.ts +++ b/frontend/src/API/API.test.ts @@ -8,9 +8,8 @@ describe("API", () => { username: "lol", // Add the username property password: "lol", }; - const response = await api.registerUser(user); - + console.log(response.message); expect(response.success).toBe(true); expect(response.data).toHaveProperty("userId"); }); @@ -24,7 +23,7 @@ describe("API", () => { "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZG1pbiI6ZmFsc2UsImV4cCI6MTcxMDk0MDIwMywibmFtZSI6InJyZ3VtZHpwbWMifQ.V9NHoYMYV61t"; const response = await api.createProject(project, token); - + console.log(response.message); expect(response.success).toBe(true); expect(response.data).toHaveProperty("projectId"); }); @@ -34,7 +33,7 @@ describe("API", () => { "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZG1pbiI6ZmFsc2UsImV4cCI6MTcxMDk0MDIwMywibmFtZSI6InJyZ3VtZHpwbWMifQ.V9NHoYMYV61t"; const response = await api.renewToken(refreshToken); - + console.log(response.message); expect(response.success).toBe(true); expect(response.data).toHaveProperty("accessToken"); expect(response.data).toHaveProperty("refreshToken"); @@ -45,7 +44,7 @@ describe("API", () => { "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZG1pbiI6ZmFsc2UsImV4cCI6MTcxMDk0MDIwMywibmFtZSI6InJyZ3VtZHpwbWMifQ.V9NHoYMYV61t"; const username = "rrgumdzpmc"; const response = await api.getUserProjects(username, token); - + console.log(response.message); expect(response.success).toBe(true); expect(response.data).toHaveProperty("projects"); }); @@ -65,7 +64,7 @@ describe("API", () => { "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZG1pbiI6ZmFsc2UsImV4cCI6MTcxMDk0MDIwMywibmFtZSI6InJyZ3VtZHpwbWMifQ.V9NHoYMYV61t"; const response = await api.submitWeeklyReport(report, token); - + console.log(response.message); expect(response.success).toBe(true); expect(response.data).toHaveProperty( "message", @@ -80,7 +79,7 @@ describe("API", () => { }; const response = await api.login(user); - + console.log(response.message); expect(response.success).toBe(true); expect(response.data).toHaveProperty("accessToken"); expect(response.data).toHaveProperty("refreshToken");