Skip to content

Commit

Permalink
refactor(test): disable any check in sample test
Browse files Browse the repository at this point in the history
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
  • Loading branch information
PixnBits committed Jul 9, 2024
1 parent 51215ec commit b9cea36
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tests-examples/demo-todo-app.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
Expand All @@ -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);
}

0 comments on commit b9cea36

Please sign in to comment.