-
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathExifMap.test.tsx
More file actions
23 lines (20 loc) · 618 Bytes
/
ExifMap.test.tsx
File metadata and controls
23 lines (20 loc) · 618 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import { fireEvent, render, screen } from '@testing-library/react'
import { describe, it } from 'vitest'
import ExifMap from './ExifMap'
describe('ExifMap', () => {
it('renders without crashing', async () => {
render(
<>
<input id="toggle" data-testid="toggle" type="checkbox" />
<ExifMap
gps={{ latitude: 41.89007222222222, longitude: 12.491516666666666 }}
/>
</>
)
await screen.findByText(/wheel to zoom/)
// Simulate a change event on the checkbox
fireEvent.change(screen.getByTestId('toggle'), {
target: { checked: true }
})
})
})