Skip to content

Commit

Permalink
fix(#526): improve flakey inventory test
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyckahn committed Dec 1, 2024
1 parent 28ba0d7 commit b8fe71e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Inventory/Inventory.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ describe('Inventory Component', () => {
const searchInput = screen.getByPlaceholderText('Search inventory...')
fireEvent.change(searchInput, { target: { value: 'Carrot' } })

vitest.runAllTimers()
vitest.advanceTimersByTime(1000)

expect(screen.getByText('Carrot')).toBeInTheDocument()
expect(screen.queryByText('Pumpkin Seed')).not.toBeInTheDocument()
Expand Down

0 comments on commit b8fe71e

Please sign in to comment.