Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tslint-jest

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tslint-jest - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

dist/src/rules/noAliasMethodsRule.js

9

dist/src/rules/expectExpectRule.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc