Skip to content

Commit

Permalink
✅ test: add vitest.setup.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
m-tartari committed Jan 20, 2024
1 parent e8fcd57 commit 16297d7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 3 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import react from '@vitejs/plugin-react-swc'
export default defineConfig({
plugins: [react()],
test: {
environment: 'jsdom'
globals: true,
environment: 'jsdom',
setupFiles: ['./vitest.setup.ts']
}
})
5 changes: 5 additions & 0 deletions vitest.setup.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// jest-dom adds custom jest matchers for asserting on DOM nodes.
// allows you to do things like:
// expect(element).toHaveTextContent(/react/i)
// learn more: https://github.com/testing-library/jest-dom
import '@testing-library/jest-dom';

0 comments on commit 16297d7

Please sign in to comment.