Skip to content

Commit

Permalink
Better test for error checking
Browse files Browse the repository at this point in the history
  • Loading branch information
pleek91 committed Jan 3, 2024
1 parent e0443a7 commit 71164ec
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/utilities/updateBrowserUrl.spec.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import { expect, test } from 'vitest'
import { isBrowser } from '@/utilities/isBrowser'
import { updateBrowserUrl } from '@/utilities/updateBrowserUrl'

test('does nothing when the window is not available', () => {
updateBrowserUrl('http://example.com2/foo')

expect(isBrowser).toBe(false)
expect(() => updateBrowserUrl('http://example.com2/foo')).not.toThrowError()
})

0 comments on commit 71164ec

Please sign in to comment.