@@ -51,6 +51,11 @@ describe('rules/validate-parameter-separator', function() {
5151 . to . have . one . validation . error . from ( 'validateParameterSeparator' ) ;
5252 } ) ;
5353
54+ it ( 'should validate class methods' , function ( ) {
55+ expect ( checker . checkString ( 'class a { constructor(a, b) {} }' ) )
56+ . to . have . one . validation . error . from ( 'validateParameterSeparator' ) ;
57+ } ) ;
58+
5459 it ( 'should report unexpected space for function a(b ,c) {}' , function ( ) {
5560 expect ( checker . checkString ( 'function a(b ,c) {}' ) )
5661 . to . have . one . validation . error . from ( 'validateParameterSeparator' ) ;
@@ -102,6 +107,11 @@ describe('rules/validate-parameter-separator', function() {
102107 . to . have . one . validation . error . from ( 'validateParameterSeparator' ) ;
103108 } ) ;
104109
110+ it ( 'should validate class methods' , function ( ) {
111+ expect ( checker . checkString ( 'class a { constructor(a , b) {} }' ) )
112+ . to . have . one . validation . error . from ( 'validateParameterSeparator' ) ;
113+ } ) ;
114+
105115 it ( 'should report missing space for function a(b,c) {}' , function ( ) {
106116 expect ( checker . checkString ( 'function a(b,c) {}' ) )
107117 . to . have . one . validation . error . from ( 'validateParameterSeparator' ) ;
@@ -149,6 +159,11 @@ describe('rules/validate-parameter-separator', function() {
149159 . to . have . one . validation . error . from ( 'validateParameterSeparator' ) ;
150160 } ) ;
151161
162+ it ( 'should validate class methods' , function ( ) {
163+ expect ( checker . checkString ( 'class a { constructor(a , b) {} }' ) )
164+ . to . have . one . validation . error . from ( 'validateParameterSeparator' ) ;
165+ } ) ;
166+
152167 it ( 'should report missing space for function a(b,c) {}' , function ( ) {
153168 expect ( checker . checkString ( 'function a(b,c) {}' ) )
154169 . to . have . one . validation . error . from ( 'validateParameterSeparator' ) ;
@@ -192,6 +207,11 @@ describe('rules/validate-parameter-separator', function() {
192207 . to . have . one . validation . error . from ( 'validateParameterSeparator' ) ;
193208 } ) ;
194209
210+ it ( 'should validate class methods' , function ( ) {
211+ expect ( checker . checkString ( 'class a { constructor(a, b) {} }' ) )
212+ . to . have . one . validation . error . from ( 'validateParameterSeparator' ) ;
213+ } ) ;
214+
195215 it ( 'should report missing space for function a(b ,c) {}' , function ( ) {
196216 expect ( checker . checkString ( 'function a(b ,c) {}' ) )
197217 . to . have . one . validation . error . from ( 'validateParameterSeparator' ) ;
0 commit comments