eslint-plugin-jasmine
Advanced tools
Comparing version 2.8.1 to 2.8.2
@@ -16,3 +16,5 @@ 'use strict' | ||
if (arg.type === 'FunctionExpression' && arg.params.length) { | ||
if ((arg.type === 'FunctionExpression' || arg.type === 'ArrowFunctionExpression') && | ||
arg.params.length | ||
) { | ||
context.report({ | ||
@@ -19,0 +21,0 @@ message: "Unexpected argument in suite's callback", |
@@ -54,3 +54,3 @@ { | ||
}, | ||
"version": "2.8.1" | ||
"version": "2.8.2" | ||
} |
@@ -5,5 +5,10 @@ 'use strict' | ||
var RuleTester = require('eslint').RuleTester | ||
var linesToCode = require('../helpers/lines_to_code') | ||
var eslintTester = new RuleTester() | ||
const parserOptions = { | ||
ecmaVersion: 8 | ||
} | ||
var eslintTester = new RuleTester({parserOptions}) | ||
eslintTester.run('describe-with-done', rule, { | ||
@@ -17,3 +22,15 @@ valid: [ | ||
'describe("My suite", function() {\nit("A spec", function(done) {});\n});', | ||
'describe("My suite", function() {\nit("A spec", function(done) {\ndone();\n});\n });' | ||
'describe("My suite", function() {\nit("A spec", function(done) {\ndone();\n});\n });', | ||
linesToCode([ | ||
'describe("", () => {', | ||
' it("", () => {', | ||
' });', | ||
'});' | ||
]), | ||
linesToCode([ | ||
'describe("", () => {', | ||
' it("", (done) => {', | ||
' });', | ||
'});' | ||
]) | ||
], | ||
@@ -77,4 +94,29 @@ | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
code: linesToCode([ | ||
'describe("", (done) => {', | ||
' it("", (done) => {', | ||
' });', | ||
'});' | ||
]), | ||
errors: [ | ||
{ | ||
message: "Unexpected argument in suite's callback" | ||
} | ||
] | ||
}, | ||
{ | ||
code: linesToCode([ | ||
'describe("", () => {', | ||
' describe("", (done) => {', | ||
' });', | ||
'});' | ||
]), | ||
errors: [ | ||
{ | ||
message: "Unexpected argument in suite's callback" | ||
} | ||
] | ||
}] | ||
}) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
170963
2205