diff options
author | INOUE Daisuke <inoue.daisuke@gmail.com> | 2025-05-28 23:25:36 +0900 |
---|---|---|
committer | INOUE Daisuke <inoue.daisuke@gmail.com> | 2025-05-28 23:25:36 +0900 |
commit | fb85d79dd2333cd6e0982e5ee0fdc1070ff99889 (patch) | |
tree | e20a4f074704a2f5ede5ebd05b4f4ad949cd8205 | |
parent | b2e8547dc9c91bf48bd5743e1bda2c9e507da908 (diff) |
To pass final test
-rw-r--r-- | cypress/e2e/event.cy.ts | 10 | ||||
-rw-r--r-- | src/routes/frontend.ts | 2 |
2 files changed, 8 insertions, 4 deletions
diff --git a/cypress/e2e/event.cy.ts b/cypress/e2e/event.cy.ts index eeaa629..5d77fc7 100644 --- a/cypress/e2e/event.cy.ts +++ b/cypress/e2e/event.cy.ts @@ -304,9 +304,13 @@ describe("Events", () => { cy.clearAllLocalStorage(); localStorage.setItem("editTokens", "invalid"); cy.visit(`/${this.eventID}`).then(() => { - expect(localStorage.getItem("editTokens")).to.not.include( - "invalid", - ); + const editTokens = localStorage.getItem("editTokens"); + if (editTokens !== null) { + expect(editTokens).to.not.include("invalid"); + } else { + // If it's null, the invalid token was successfully removed + expect(editTokens).to.be.null; + } }); }); }); diff --git a/src/routes/frontend.ts b/src/routes/frontend.ts index a64bce4..fca14c6 100644 --- a/src/routes/frontend.ts +++ b/src/routes/frontend.ts @@ -175,7 +175,7 @@ router.get("/:eventID", async (req: Request, res: Response) => { timezone: moment .tz(event.end, event.timezone) - .format(' (z)',) + .format('(z)',) }); } else { displayDate = i18next.t("frontend.displaydate-days", |