File tree Expand file tree Collapse file tree 2 files changed +22
-10
lines changed
Expand file tree Collapse file tree 2 files changed +22
-10
lines changed Original file line number Diff line number Diff line change 1+ import { expect , afterEach } from "vitest" ;
2+ import { cleanup } from "@testing-library/react" ;
3+ import * as matchers from "@testing-library/jest-dom/matchers" ;
4+
5+ expect . extend ( matchers ) ;
6+
7+ afterEach ( ( ) => {
8+ cleanup ( ) ;
9+ } ) ;
Original file line number Diff line number Diff line change 11import { defineConfig } from "vitest/config" ;
2- import babel from "@rollup/plugin-babel" ;
3-
4- const extensions = [ ".ts" , ".tsx" , ".js" ] ;
5- const babelPlugin = babel ( {
6- babelHelpers : "bundled" ,
7- sourceMaps : true ,
8- extensions,
9- exclude : / n o d e _ m o d u l e s .* / ,
10- } ) ;
2+ import react from "@vitejs/plugin-react" ;
113
4+ // https://vitejs.dev/config/
125export default defineConfig ( {
13- plugins : [ babelPlugin ] ,
6+ plugins : [
7+ react ( {
8+ babel : {
9+ exclude : / n o d e _ m o d u l e s .* / ,
10+ } ,
11+ } ) ,
12+ ] ,
13+ test : {
14+ environment : "jsdom" ,
15+ setupFiles : [ "./test/setup.ts" ] ,
16+ } ,
1417} ) ;
You can’t perform that action at this time.
0 commit comments