Tasks /
TypeScript /
Price filter — TypeScript
Statement
easy
Price filter — TypeScript
The `search(items, query, maxPrice)` function returns items whose name contains
`query` and whose price is at most `maxPrice`.
Write Vitest tests. Cover the name filter, the exact upper boundary, a negative
limit, case-insensitivity and an empty result.
TypeScript · Vitest
AI mentor
The AI mentor is available after you log in: it sees your attempt history and does not spend resources on anonymous requests.
Log in and ask
Hints
1 of 3 unlocked · attempts: 0
Hint 1
Check not only that a matching item is found, but also that a non-matching item
is excluded. Pay special attention to the exact price boundary and a negative
limit.
Hint 2 — unlocks after 1 attempt
Hint 3 — unlocks after 3 attempts