@@ -100,7 +100,8 @@ describe('Converter', function() {
100100
101101describe ( 'Converter with excludeNotExported=true' , function ( ) {
102102 const base = Path . join ( __dirname , 'converter' ) ;
103- const path = Path . join ( base , 'export-with-local' ) ;
103+ const exportWithLocalDir = Path . join ( base , 'export-with-local' ) ;
104+ const classDir = Path . join ( base , 'class' ) ;
104105 let app : Application ;
105106
106107 it ( 'constructs' , function ( ) {
@@ -117,17 +118,36 @@ describe('Converter with excludeNotExported=true', function() {
117118
118119 let result : ProjectReflection ;
119120
120- it ( 'converts fixtures' , function ( ) {
121- resetReflectionID ( ) ;
122- result = app . convert ( app . expandInputFiles ( [ path ] ) ) ;
123- Assert ( result instanceof ProjectReflection , 'No reflection returned' ) ;
121+ describe ( 'export-with-local' , ( ) => {
122+ it ( 'converts fixtures' , function ( ) {
123+ resetReflectionID ( ) ;
124+ result = app . convert ( app . expandInputFiles ( [ exportWithLocalDir ] ) ) ;
125+ Assert ( result instanceof ProjectReflection , 'No reflection returned' ) ;
126+ } ) ;
127+
128+ it ( 'matches specs' , function ( ) {
129+ const specs = JSON . parse ( FS . readFileSync ( Path . join ( exportWithLocalDir , 'specs-without-exported.json' ) ) . toString ( ) ) ;
130+ let data = JSON . stringify ( result . toObject ( ) , null , ' ' ) ;
131+ data = data . split ( normalizePath ( base ) ) . join ( '%BASE%' ) ;
132+
133+ compareReflections ( JSON . parse ( data ) , specs ) ;
134+ } ) ;
124135 } ) ;
125136
126- it ( 'matches specs' , function ( ) {
127- const specs = JSON . parse ( FS . readFileSync ( Path . join ( path , 'specs-without-exported.json' ) ) . toString ( ) ) ;
128- let data = JSON . stringify ( result . toObject ( ) , null , ' ' ) ;
129- data = data . split ( normalizePath ( base ) ) . join ( '%BASE%' ) ;
137+ describe ( 'class' , ( ) => {
138+ it ( 'converts fixtures' , function ( ) {
139+ resetReflectionID ( ) ;
140+ result = app . convert ( app . expandInputFiles ( [ classDir ] ) ) ;
141+ Assert ( result instanceof ProjectReflection , 'No reflection returned' ) ;
142+ } ) ;
143+
144+ it ( 'matches specs' , function ( ) {
145+ const specs = JSON . parse ( FS . readFileSync ( Path . join ( classDir , 'specs-without-exported.json' ) ) . toString ( ) ) ;
146+ let data = JSON . stringify ( result . toObject ( ) , null , ' ' ) ;
147+ data = data . split ( normalizePath ( base ) ) . join ( '%BASE%' ) ;
130148
131- compareReflections ( JSON . parse ( data ) , specs ) ;
149+ compareReflections ( JSON . parse ( data ) , specs ) ;
150+ } ) ;
132151 } ) ;
152+
133153} ) ;
0 commit comments