@@ -100,7 +100,8 @@ describe('Converter', function() {
100
100
101
101
describe ( 'Converter with excludeNotExported=true' , function ( ) {
102
102
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' ) ;
104
105
let app : Application ;
105
106
106
107
it ( 'constructs' , function ( ) {
@@ -117,17 +118,36 @@ describe('Converter with excludeNotExported=true', function() {
117
118
118
119
let result : ProjectReflection ;
119
120
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
+ } ) ;
124
135
} ) ;
125
136
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%' ) ;
130
148
131
- compareReflections ( JSON . parse ( data ) , specs ) ;
149
+ compareReflections ( JSON . parse ( data ) , specs ) ;
150
+ } ) ;
132
151
} ) ;
152
+
133
153
} ) ;
0 commit comments