feat: react/vite/tailwind web scaffold with jsdom tests
This commit is contained in:
6
web/test/setup.ts
Normal file
6
web/test/setup.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import { afterEach } from 'vitest'
|
||||
import { cleanup } from '@testing-library/react'
|
||||
|
||||
afterEach(() => {
|
||||
cleanup()
|
||||
})
|
||||
10
web/test/smoke.test.tsx
Normal file
10
web/test/smoke.test.tsx
Normal file
@@ -0,0 +1,10 @@
|
||||
import { describe, it, expect } from 'vitest'
|
||||
import { render, screen } from '@testing-library/react'
|
||||
import App from '../src/App'
|
||||
|
||||
describe('App', () => {
|
||||
it('renders the app title', () => {
|
||||
render(<App />)
|
||||
expect(screen.getByRole('heading', { name: 'record-shop' })).toBeTruthy()
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user