This repository has been archived by the owner on Oct 31, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3cf39c6
commit 92532b3
Showing
5 changed files
with
61 additions
and
1 deletion.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { render, screen } from '@testing-library/react' | ||
import { describe, it, expect } from 'vitest' | ||
|
||
import Header from './Header' | ||
|
||
describe('Header', () => { | ||
it('should display web app logo', async () => { | ||
render(<Header />) | ||
expect(screen.queryByRole('img', { name: 'logo' })).toBeInTheDocument() | ||
}) | ||
|
||
it('should display web app title', async () => { | ||
render(<Header />) | ||
expect(screen.queryByText('Topos Faucet')).toBeInTheDocument() | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,16 @@ | ||
/// <reference types="vitest" /> | ||
import { defineConfig } from 'vite' | ||
import react from '@vitejs/plugin-react-swc' | ||
|
||
// https://vitejs.dev/config/ | ||
export default defineConfig({ | ||
plugins: [react()], | ||
test: { | ||
globals: true, | ||
environment: 'jsdom', | ||
setupFiles: './src/setupTests.ts', | ||
// you might want to disable it, if you don't have tests that rely on CSS | ||
// since parsing CSS is slow | ||
css: true, | ||
}, | ||
}) |