@@ -37,21 +37,21 @@ describe('rules/require-spaces-in-function-expression', function() {
3737 expect ( checker . checkString ( 'var x = function a (){}' ) ) . to . have . no . errors ( ) ;
3838 } ) ;
3939
40- it ( 'should report missing space before round brace in FunctionExpression' , function ( ) {
40+ it ( 'should report missing space before round brace in async FunctionExpression' , function ( ) {
4141 expect ( checker . checkString ( 'var x = async function(){}' ) )
4242 . to . have . one . validation . error . from ( 'requireSpacesInFunctionExpression' ) ;
4343 } ) ;
4444
45- it ( 'should report missing space before round brace in named FunctionExpression' , function ( ) {
45+ it ( 'should report missing space before round brace in named async FunctionExpression' , function ( ) {
4646 expect ( checker . checkString ( 'var x = async function a(){}' ) )
4747 . to . have . one . validation . error . from ( 'requireSpacesInFunctionExpression' ) ;
4848 } ) ;
4949
50- it ( 'should not report space before round brace in FunctionExpression' , function ( ) {
50+ it . only ( 'should not report space before round brace in async FunctionExpression' , function ( ) {
5151 expect ( checker . checkString ( 'var x = async function (){}' ) ) . to . have . no . errors ( ) ;
5252 } ) ;
5353
54- it ( 'should not report space before round brace in named FunctionExpression' , function ( ) {
54+ it ( 'should not report space before round brace in named async FunctionExpression' , function ( ) {
5555 expect ( checker . checkString ( 'var x = async function a (){}' ) ) . to . have . no . errors ( ) ;
5656 } ) ;
5757
@@ -101,6 +101,22 @@ describe('rules/require-spaces-in-function-expression', function() {
101101 output : 'var x = function (){}'
102102 } ) ;
103103
104+ reportAndFix ( {
105+ name : 'missing space before round brace in generator FunctionExpression' ,
106+ rules : rules ,
107+ errors : 1 ,
108+ input : 'var x = function*(){}' ,
109+ output : 'var x = function* (){}'
110+ } ) ;
111+
112+ reportAndFix ( {
113+ name : 'missing space before round brace in generator FunctionExpression' ,
114+ rules : rules ,
115+ errors : 1 ,
116+ input : 'var x = function *(){}' ,
117+ output : 'var x = function * (){}'
118+ } ) ;
119+
104120 reportAndFix ( {
105121 name : 'missing space before round brace in method shorthand' ,
106122 rules : rules ,
0 commit comments