@@ -40,6 +40,8 @@ describe('DeclarationIndex', () => {
4040 join ( rootPath , 'helper-functions.ts' ) ,
4141 join ( rootPath , 'myReactTemplate.tsx' ) ,
4242 join ( rootPath , 'prototype-funcs.ts' ) ,
43+ join ( rootPath , 'index.ts' ) ,
44+ join ( rootPath , '_index.ts' ) ,
4345 ] ;
4446
4547 beforeEach ( async ( ) => {
@@ -84,6 +86,14 @@ describe('DeclarationIndex', () => {
8486 expect ( resource ) . toMatchSnapshot ( ) ;
8587 } ) ;
8688
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+
8797 } ) ;
8898
8999 describe ( 'reindexForChanges()' , ( ) => {
@@ -183,7 +193,7 @@ describe('DeclarationIndex', () => {
183193 export class FancierLibraryClass {
184194 public doSomethingAwesome(): void { }
185195 }
186-
196+
187197 export * from './foobar'` ,
188198 } ) ;
189199
@@ -265,7 +275,7 @@ describe('DeclarationIndex', () => {
265275 export class FancierLibraryClass {
266276 public doSomethingAwesome(): void { }
267277 }
268-
278+
269279 export * from './foobar'` ,
270280 } ) ;
271281
@@ -290,7 +300,7 @@ describe('DeclarationIndex', () => {
290300 export class FancierLibraryClass {
291301 public doSomethingAwesome(): void { }
292302 }
293-
303+
294304 export * from './foobar'` ,
295305 } ) ;
296306
0 commit comments