@@ -40,6 +40,8 @@ describe('DeclarationIndex', () => {
40
40
join ( rootPath , 'helper-functions.ts' ) ,
41
41
join ( rootPath , 'myReactTemplate.tsx' ) ,
42
42
join ( rootPath , 'prototype-funcs.ts' ) ,
43
+ join ( rootPath , 'index.ts' ) ,
44
+ join ( rootPath , '_index.ts' ) ,
43
45
] ;
44
46
45
47
beforeEach ( async ( ) => {
@@ -84,6 +86,14 @@ describe('DeclarationIndex', () => {
84
86
expect ( resource ) . toMatchSnapshot ( ) ;
85
87
} ) ;
86
88
89
+ it ( 'should properly index non-barrel files ending in `index`' , ( ) => {
90
+ const barrelExport = declarationIndex . index ! [ 'barrelExport' ] ;
91
+ expect ( barrelExport ) . toMatchSnapshot ( ) ;
92
+
93
+ const _index = declarationIndex . index ! [ '_index' ] ;
94
+ expect ( _index ) . toMatchSnapshot ( ) ;
95
+ } ) ;
96
+
87
97
} ) ;
88
98
89
99
describe ( 'reindexForChanges()' , ( ) => {
@@ -183,7 +193,7 @@ describe('DeclarationIndex', () => {
183
193
export class FancierLibraryClass {
184
194
public doSomethingAwesome(): void { }
185
195
}
186
-
196
+
187
197
export * from './foobar'` ,
188
198
} ) ;
189
199
@@ -265,7 +275,7 @@ describe('DeclarationIndex', () => {
265
275
export class FancierLibraryClass {
266
276
public doSomethingAwesome(): void { }
267
277
}
268
-
278
+
269
279
export * from './foobar'` ,
270
280
} ) ;
271
281
@@ -290,7 +300,7 @@ describe('DeclarationIndex', () => {
290
300
export class FancierLibraryClass {
291
301
public doSomethingAwesome(): void { }
292
302
}
293
-
303
+
294
304
export * from './foobar'` ,
295
305
} ) ;
296
306
0 commit comments