eslint-plugin-should-promised
Advanced tools
Comparing version 1.0.3 to 1.0.4
{ | ||
"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 @@ ] |
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
5
9878