diff --git a/package.json b/package.json index 218c01f2c..7418f47a4 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "cucumber-expressions": "^6.0.1", "escape-string-regexp": "^1.0.3", "figures": "^2.0.0", - "fn-args": "^3.0.0", + "fn-args": "^4.0.0", "gherkin": "^5.1.0", "glob": "^6.0.1", "inquirer": "^6.2.1", diff --git a/test/unit/utils_test.js b/test/unit/utils_test.js index 4f995f1be..f2dd09034 100644 --- a/test/unit/utils_test.js +++ b/test/unit/utils_test.js @@ -11,6 +11,11 @@ describe('utils', () => { it('fn#1', () => utils.getParamNames((a, b) => {}).should.eql(['a', 'b'])); it('fn#2', () => utils.getParamNames((I, userPage) => { }).should.eql(['I', 'userPage'])); it('should handle single-param arrow functions with omitted parens', () => utils.getParamNames((I) => {}).should.eql(['I'])); + it('should handle trailing comma', () => utils.getParamNames(( + I, + trailing, + comma, + ) => {}).should.eql(['I', 'trailing', 'comma'])); }); describe('#methodsOfObject', () => {