Browse Source

refactor(test): disable any check in sample test

the test file is an example, does not test this project in any way, and will be removed as tests for this project are written and the example is no longer needed
pull/205/head
Nick Oliver 2 years ago
parent
commit
b9cea363c9
  1. 10
      tests-examples/demo-todo-app.spec.ts

10
tests-examples/demo-todo-app.spec.ts

@ -474,6 +474,7 @@ async function checkNumberOfCompletedTodosInLocalStorage(
return await page.waitForFunction((e) => {
return (
JSON.parse(localStorage["react-todos"]).filter(
// biome-ignore lint/suspicious/noExplicitAny: test example from Playwright, any is only for demonstration and won't be used testing the project
(todo: any) => todo.completed,
).length === e
);
@ -482,8 +483,11 @@ async function checkNumberOfCompletedTodosInLocalStorage(
async function checkTodosInLocalStorage(page: Page, title: string) {
return await page.waitForFunction((t) => {
return JSON.parse(localStorage["react-todos"])
.map((todo: any) => todo.title)
.includes(t);
return (
JSON.parse(localStorage["react-todos"])
// biome-ignore lint/suspicious/noExplicitAny: test example from Playwright, any is only for demonstration and won't be used testing the project
.map((todo: any) => todo.title)
.includes(t)
);
}, title);
}

Loading…
Cancel
Save