@@ -2,7 +2,7 @@ const defaults = {
22 rootDir : "src" ,
33 preset : "ts-jest" ,
44 testEnvironment : "jsdom" ,
5- setupFiles : [ "<rootDir>/config/jest/setup.ts" ] ,
5+ setupFilesAfterEnv : [ "<rootDir>/config/jest/setup.ts" ] ,
66 testEnvironmentOptions : {
77 url : "http://localhost" ,
88 } ,
@@ -25,6 +25,13 @@ const defaults = {
2525const ignoreTSFiles = '.ts$' ;
2626const ignoreTSXFiles = '.tsx$' ;
2727
28+ const react17TestFileIgnoreList = [
29+ ignoreTSFiles ,
30+ // For now, we only support useSuspenseQuery with React 18, so no need to test
31+ // it with React 17
32+ 'src/react/hooks/__tests__/useSuspenseQuery.test.tsx'
33+ ]
34+
2835const react18TestFileIgnoreList = [
2936 // ignore core tests (.ts files) as they are run separately
3037 // to avoid running them twice with both react versions
@@ -68,7 +75,7 @@ const standardReact18Config = {
6875const standardReact17Config = {
6976 ...defaults ,
7077 displayName : "ReactDOM 17" ,
71- testPathIgnorePatterns : [ ignoreTSFiles ] ,
78+ testPathIgnorePatterns : react17TestFileIgnoreList ,
7279 moduleNameMapper : {
7380 "^react$" : "react-17" ,
7481 "^react-dom$" : "react-dom-17" ,
0 commit comments