Check for unused vars and params in specs

This commit is contained in:
Steve Gravrock
2022-04-16 10:58:25 -07:00
parent 364cf35474
commit 482dc883eb
20 changed files with 81 additions and 80 deletions
+8 -8
View File
@@ -392,7 +392,7 @@ describe('matchersUtil', function() {
it('passes when an asymmetric equality tester returns true', function() {
var tester = {
asymmetricMatch: function(other) {
asymmetricMatch: function() {
return true;
}
},
@@ -404,7 +404,7 @@ describe('matchersUtil', function() {
it('fails when an asymmetric equality tester returns false', function() {
var tester = {
asymmetricMatch: function(other) {
asymmetricMatch: function() {
return false;
}
},
@@ -424,7 +424,7 @@ describe('matchersUtil', function() {
});
it('passes when a custom equality matcher returns true', function() {
var tester = function(a, b) {
var tester = function() {
return true;
},
matchersUtil = new jasmineUnderTest.MatchersUtil({
@@ -441,7 +441,7 @@ describe('matchersUtil', function() {
});
describe("when a custom equality matcher returns 'undefined'", function() {
var tester = function(a, b) {
var tester = function() {
return jasmine.undefined;
};
@@ -455,7 +455,7 @@ describe('matchersUtil', function() {
});
it('fails for equivalents when a custom equality matcher returns false', function() {
var tester = function(a, b) {
var tester = function() {
return false;
},
matchersUtil = new jasmineUnderTest.MatchersUtil({
@@ -468,11 +468,11 @@ describe('matchersUtil', function() {
it('passes for an asymmetric equality tester that returns true when a custom equality tester return false', function() {
var asymmetricTester = {
asymmetricMatch: function(other) {
asymmetricMatch: function() {
return true;
}
},
symmetricTester = function(a, b) {
symmetricTester = function() {
return false;
},
matchersUtil = new jasmineUnderTest.MatchersUtil({
@@ -1009,7 +1009,7 @@ describe('matchersUtil', function() {
});
it('uses custom equality testers if actual is an Array', function() {
var customTester = function(a, b) {
var customTester = function() {
return true;
},
matchersUtil = new jasmineUnderTest.MatchersUtil({
-6
View File
@@ -368,9 +368,6 @@ describe('toEqual', function() {
});
it('reports mismatches between objects with their own constructor property', function() {
function Foo() {}
function Bar() {}
var actual = { x: { constructor: 'blerf' } },
expected = { x: { constructor: 'ftarrh' } },
message = "Expected $.x.constructor = 'blerf' to equal 'ftarrh'.";
@@ -379,9 +376,6 @@ describe('toEqual', function() {
});
it('reports mismatches between an object with a real constructor and one with its own constructor property', function() {
function Foo() {}
function Bar() {}
var actual = { x: {} },
expected = { x: { constructor: 'ftarrh' } },
message =
@@ -18,8 +18,7 @@ describe('toHaveBeenCalledTimes', function() {
it('fails when expected numbers is not supplied', function() {
var matcher = jasmineUnderTest.matchers.toHaveBeenCalledTimes(),
spy = new jasmineUnderTest.Spy('spy'),
result;
spy = new jasmineUnderTest.Spy('spy');
spy();
expect(function() {