Skip to content

Commit

Permalink
Merge pull request #559 from systemli/Remove-Snapshot-Tests
Browse files Browse the repository at this point in the history
Remove Snapshot Tests
  • Loading branch information
0x46616c6b authored Jan 7, 2024
2 parents a48747c + 388c9b6 commit 019bd9d
Show file tree
Hide file tree
Showing 6 changed files with 150 additions and 881 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"@testing-library/jest-dom": "6.2.0",
"@testing-library/react": "^14.1.2",
"@testing-library/user-event": "^14.5.2",
"@types/jest": "^29.5.11",
"@types/node": "^20.10.7",
"@types/react-dom": "^18.2.17",
"@typescript-eslint/eslint-plugin": "^6.17.0",
Expand Down
21 changes: 0 additions & 21 deletions src/components/Attachments.test.tsx

This file was deleted.

20 changes: 1 addition & 19 deletions src/components/Message.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,7 @@ describe('Message', function () {
attachments: [],
geoInformation: '{"type":"FeatureCollection","features":[]}',
}
const { asFragment } = render(<Message message={message} />)

expect(asFragment()).toMatchSnapshot()

render(<Message message={message} />)
expect(screen.getByText('a few seconds ago')).toBeInTheDocument()
})

test('renders with map correctly', function () {
const message = {
id: '1',
text: 'message',
ticker: 1,
createdAt: new Date(),
attachments: [],
geoInformation:
'{"type":"FeatureCollection","features":[{"type":"Feature","geometry":{"type":"Point","coordinates":[13.466282,52.5024]},"properties":null}]}',
}
const { asFragment } = render(<Message message={message} />)

expect(asFragment()).toMatchSnapshot()
})
})
323 changes: 0 additions & 323 deletions src/components/__snapshots__/Attachments.test.tsx.snap

This file was deleted.

Loading

0 comments on commit 019bd9d

Please sign in to comment.