tslint-jest
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -30,6 +30,9 @@ "use strict"; | ||
function Walk(sourceFile, options) { | ||
return _super.call(this, sourceFile, options) || this; | ||
var _this = _super.call(this, sourceFile, options) || this; | ||
_this.assertionFunctionsNames = ['expect'].concat(_this.getOptions()); | ||
_this.testFunctionsNames = ['it', 'test']; | ||
return _this; | ||
} | ||
Walk.prototype.visitCallExpression = function (node) { | ||
if (node.expression.getText() === 'it' || node.expression.getText() === 'test') { | ||
if (this.testFunctionsNames.includes(node.expression.getText())) { | ||
if (node.arguments[1]) { | ||
@@ -42,3 +45,3 @@ this.testFunctionHasAssertion(node.arguments[1]); | ||
Walk.prototype.isCallExpressionAssertion = function (node) { | ||
return node.getChildAt(0).getText() === 'expect'; | ||
return this.assertionFunctionsNames.includes(node.getChildAt(0).getText()); | ||
}; | ||
@@ -45,0 +48,0 @@ Walk.prototype.testFunctionHasAssertion = function (node) { |
{ | ||
"name": "tslint-jest", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "tslint-jest.json", |
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
10826
7
140
0