Progmasoft Git

progmaweb

The site and account service of Progmasoft: a Next.js frontend and an ASP.NET Core API.

Clonegit clone https://git.progmasoft.com/progmaweb

Give the localStorage step of the preferences test a block body

The arrow function passed to page.evaluate returned the void result of
localStorage.setItem. A block body says that nothing is returned, which is
what no-confusing-void-expression asks for (Codacy on #81).
Commit
db0a232f68c57fabbf411b73f575822a0ff2ec76
Author
Leitwolf11 ·
Parents
6d7830590085

Files · Download .tar.gz

Changes

 apps/web/e2e/preferences.spec.ts | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/apps/web/e2e/preferences.spec.ts b/apps/web/e2e/preferences.spec.ts
index 18a3326..cc2bdce 100644
--- a/apps/web/e2e/preferences.spec.ts
+++ b/apps/web/e2e/preferences.spec.ts
@@ -60,7 +60,9 @@ test("a theme of an earlier version in localStorage moves into the shared cookie
   page,
 }) => {
   await open(page, "account.progmasoft.com/");
-  await page.evaluate(() => localStorage.setItem("progmasoft_theme", "dark"));
+  await page.evaluate(() => {
+    localStorage.setItem("progmasoft_theme", "dark");
+  });
   await open(page, "account.progmasoft.com/");
   expect(await theme(page)).toBe("dark");
   await open(page, "viget.progmasoft.com/");