@@ -134,9 +134,10 @@ describe('toObjectEntry', () => {
134134 expect ( Object . keys ( result ) ) . not . toContain ( 'hooks/index' )
135135 } )
136136
137- test ( 'object entry with multiple negation patterns' , async ( context ) => {
137+ test ( 'object entry with multiple patterns' , async ( context ) => {
138138 const { testDir } = await writeFixtures ( context , {
139139 'src/utils/index.ts' : '' ,
140+ 'src/utils/tsx.tsx' : '' ,
140141 'src/utils/internal.ts' : '' ,
141142 'src/utils/helper.ts' : '' ,
142143 'src/utils/format.ts' : '' ,
@@ -145,19 +146,21 @@ describe('toObjectEntry', () => {
145146 {
146147 'utils/*' : [
147148 'src/utils/*.ts' ,
149+ 'src/utils/*.tsx' ,
148150 '!src/utils/index.ts' ,
149151 '!src/utils/internal.ts' ,
150152 ] ,
151153 } ,
152154 testDir ,
153155 )
154156 expect ( result ) . toEqual ( {
157+ 'utils/tsx' : path . join ( testDir , 'src/utils/tsx.tsx' ) ,
155158 'utils/helper' : path . join ( testDir , 'src/utils/helper.ts' ) ,
156159 'utils/format' : path . join ( testDir , 'src/utils/format.ts' ) ,
157160 } )
158161 } )
159162
160- test ( 'object entry with multiple positive patterns should throw' , async ( context ) => {
163+ test ( 'object entry with different patterns base should throw' , async ( context ) => {
161164 const { testDir } = await writeFixtures ( context , {
162165 'src/hooks/useAuth.ts' : '' ,
163166 'src/utils/helper.ts' : '' ,
@@ -169,7 +172,9 @@ describe('toObjectEntry', () => {
169172 } ,
170173 testDir ,
171174 ) ,
172- ) . rejects . toThrow ( / m u l t i p l e p o s i t i v e p a t t e r n s / )
175+ ) . rejects . toThrow (
176+ 'all value glob patterns must have the same base directory' ,
177+ )
173178 } )
174179
175180 test ( 'object entry with no positive pattern should throw' , async ( context ) => {
@@ -183,6 +188,6 @@ describe('toObjectEntry', () => {
183188 } ,
184189 testDir ,
185190 ) ,
186- ) . rejects . toThrow ( / n o p o s i t i v e p a t t e r n / )
191+ ) . rejects . toThrow ( 'Cannot find files' )
187192 } )
188193} )
0 commit comments