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

eslint-plugin-should-promised

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-should-promised - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

13

package.json
{
"name": "eslint-plugin-should-promised",
"version": "1.0.3",
"version": "1.0.4",
"description": "Eslint rule for checking that should-promised assertions return",

@@ -11,10 +11,9 @@ "main": "index.js",

"peerDependencies": {
"eslint": ">=0.23.0 <1.0.0"
"eslint": ">=0.8.0"
},
"devDependencies": {
"coveralls": "~2.11.2",
"eslint": "^0.23.0",
"eslint-tester": "^0.8.0",
"is-my-json-valid": "~2.12.0",
"istanbul": "^0.3.15",
"coveralls": "^2.11.3",
"eslint": "^1.1.0",
"is-my-json-valid": "^2.12.1",
"istanbul": "^0.3.17",
"mocha": "^2.2.5"

@@ -21,0 +20,0 @@ },

'use strict';
var linter = require('eslint').linter,
ESLintTester = require('eslint-tester'),
eslintTester = new ESLintTester(linter),
expectedErrorMessage = 'Promise assertion must return.';
var RuleTester = require('eslint').RuleTester;
var rule = require('../../lib/rules/return-promise.js');
var tester = new RuleTester();
var expectedErrorMessage = 'Promise assertion must return.';
eslintTester.addRuleTest('lib/rules/return-promise', {
tester.run('return-promise', rule, {

@@ -32,59 +32,59 @@ valid: [

code: 'var test = function() { fn().should.be.Promise(); }',
errors: [{ message: expectedErrorMessage, column: 39, line: 1 }]
errors: [{ message: expectedErrorMessage, column: 40, line: 1 }]
},
{
code: 'var test = function() { fn().should.be["Promise"](); }',
errors: [{ message: expectedErrorMessage, column: 39, line: 1 }]
errors: [{ message: expectedErrorMessage, column: 40, line: 1 }]
},
{
code: 'var test = function() { fn().should.be.fulfilled(); }',
errors: [{ message: expectedErrorMessage, column: 39, line: 1 }]
errors: [{ message: expectedErrorMessage, column: 40, line: 1 }]
},
{
code: 'var test = function() { fn().should.be["fulfilled"](); }',
errors: [{ message: expectedErrorMessage, column: 39, line: 1 }]
errors: [{ message: expectedErrorMessage, column: 40, line: 1 }]
},
{
code: 'var test = function() { fn().should.fulfilledWith(1); }',
errors: [{ message: expectedErrorMessage, column: 36, line: 1 }]
errors: [{ message: expectedErrorMessage, column: 37, line: 1 }]
},
{
code: 'var test = function() { fn().should["fulfilledWith"](1); }',
errors: [{ message: expectedErrorMessage, column: 36, line: 1 }]
errors: [{ message: expectedErrorMessage, column: 37, line: 1 }]
},
{
code: 'var test = function() { fn().should.be.rejected(); }',
errors: [{ message: expectedErrorMessage, column: 39, line: 1 }]
errors: [{ message: expectedErrorMessage, column: 40, line: 1 }]
},
{
code: 'var test = function() { fn().should.be["rejected"](); }',
errors: [{ message: expectedErrorMessage, column: 39, line: 1 }]
errors: [{ message: expectedErrorMessage, column: 40, line: 1 }]
},
{
code: 'var test = function() { fn().should.rejectedWith(1); }',
errors: [{ message: expectedErrorMessage, column: 36, line: 1 }]
errors: [{ message: expectedErrorMessage, column: 37, line: 1 }]
},
{
code: 'var test = function() { fn().should["rejectedWith"](1); }',
errors: [{ message: expectedErrorMessage, column: 36, line: 1 }]
errors: [{ message: expectedErrorMessage, column: 37, line: 1 }]
},
{
code: 'var test = function() { fn().should.finally.eql(1); }',
errors: [{ message: expectedErrorMessage, column: 36, line: 1 }]
errors: [{ message: expectedErrorMessage, column: 37, line: 1 }]
},
{
code: 'var test = function() { fn().should["finally"].eql(1); }',
errors: [{ message: expectedErrorMessage, column: 36, line: 1 }]
errors: [{ message: expectedErrorMessage, column: 37, line: 1 }]
},
{
code: 'var test = function() { fn().should.eventually.eql(1); }',
errors: [{ message: expectedErrorMessage, column: 36, line: 1 }]
errors: [{ message: expectedErrorMessage, column: 37, line: 1 }]
},
{
code: 'var test = function() { fn().should["eventually"].eql(1); }',
errors: [{ message: expectedErrorMessage, column: 36, line: 1 }]
errors: [{ message: expectedErrorMessage, column: 37, line: 1 }]
},
{
code: 'fn().should.be.fulfilled();',
errors: [{ message: expectedErrorMessage, column: 15, line: 1 }]
errors: [{ message: expectedErrorMessage, column: 16, line: 1 }]
}

@@ -91,0 +91,0 @@ ]

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