@@ -100,7 +100,7 @@ describe('test/ts.test.js', () => {
100
100
101
101
it ( 'should success with members' , ( ) => {
102
102
return coffee . spawn ( 'eslint' , [ './align/members.ts' ] , { cwd } )
103
- . debug ( )
103
+ // .debug()
104
104
. expect ( 'code' , 0 )
105
105
. end ( ) ;
106
106
} ) ;
@@ -122,15 +122,15 @@ describe('test/ts.test.js', () => {
122
122
123
123
it ( 'should fail with parameters' , ( ) => {
124
124
return coffee . spawn ( 'eslint' , [ './align/parameters-error.ts' ] , { cwd } )
125
- . debug ( )
125
+ // .debug()
126
126
. expect ( 'stdout' , / i n d e n t / )
127
127
. expect ( 'code' , 1 )
128
128
. end ( ) ;
129
129
} ) ;
130
130
131
131
it ( 'should success with statements' , ( ) => {
132
132
return coffee . spawn ( 'eslint' , [ './align/statements.ts' ] , { cwd } )
133
- . debug ( )
133
+ // .debug()
134
134
. expect ( 'code' , 0 )
135
135
. end ( ) ;
136
136
} ) ;
@@ -159,4 +159,47 @@ describe('test/ts.test.js', () => {
159
159
. end ( ) ;
160
160
} ) ;
161
161
} ) ;
162
+
163
+ describe ( 'no-useless-constructor' , ( ) => {
164
+ it ( 'should success' , ( ) => {
165
+ return coffee . spawn ( 'eslint' , [ './constructor/correct.ts' ] , { cwd } )
166
+ // .debug()
167
+ . expect ( 'code' , 0 )
168
+ . end ( ) ;
169
+ } ) ;
170
+
171
+ it ( 'should fail' , ( ) => {
172
+ return coffee . spawn ( 'eslint' , [ './constructor/not-correct.ts' ] , { cwd } )
173
+ // .debug()
174
+ . expect ( 'code' , 1 )
175
+ . expect ( 'stdout' , / @ t y p e s c r i p t - e s l i n t \/ n o - u s e l e s s - c o n s t r u c t o r / )
176
+ . end ( ) ;
177
+ } ) ;
178
+ } ) ;
179
+
180
+ describe ( 'no-use-before-define' , ( ) => {
181
+ it ( 'should success' , ( ) => {
182
+ return coffee . spawn ( 'eslint' , [ './no-use-before-define/correct.ts' ] , { cwd } )
183
+ // .debug()
184
+ . expect ( 'code' , 0 )
185
+ . end ( ) ;
186
+ } ) ;
187
+
188
+ it ( 'should fail' , ( ) => {
189
+ return coffee . spawn ( 'eslint' , [ './no-use-before-define/not-correct.ts' ] , { cwd } )
190
+ // .debug()
191
+ . expect ( 'code' , 1 )
192
+ . expect ( 'stdout' , / @ t y p e s c r i p t - e s l i n t \/ n o - u s e - b e f o r e - d e f i n e / )
193
+ . end ( ) ;
194
+ } ) ;
195
+ } ) ;
196
+
197
+ describe ( 'no-undef' , ( ) => {
198
+ it ( 'should success' , ( ) => {
199
+ return coffee . spawn ( 'eslint' , [ './no-undef/correct.ts' ] , { cwd } )
200
+ // .debug()
201
+ . expect ( 'code' , 0 )
202
+ . end ( ) ;
203
+ } ) ;
204
+ } ) ;
162
205
} ) ;
0 commit comments