Unused extensions

This commit is contained in:
Tim Schaub
2014-07-06 12:43:55 -06:00
parent 93716fc7f0
commit 7e8551a767
2 changed files with 7 additions and 38 deletions
+5 -34
View File
@@ -30,31 +30,19 @@ describe('expect.js', function() {
}).to.throwException(); }).to.throwException();
}); });
});
describe('kindaEqual', function() {
it('thinks that 1 ain\'t so different from 2', function() { it('thinks that 1 ain\'t so different from 2', function() {
expect(1).to.kindaEqual(2, 1); expect(1).to.roughlyEqual(2, 1);
}); });
it('knows that, like, 1 and 2 would, like, totally dig each other', it('knows that, like, 1 and 2 would, like, totally dig each other',
function() { function() {
expect(function() { expect(function() {
expect(1).to.kindaEqual(2, 1); expect(1).to.roughlyEqual(2, 1);
}).not.to.throwException(); }).not.to.throwException();
}); });
}); });
describe('roughlyEqual and kindaEqual', function() {
it('it\'s like they\'re soul mates', function() {
expect(expect(0).to.roughlyEqual).to.be(expect(1).to.kindaEqual);
});
});
describe('called', function() { describe('called', function() {
var telephone; var telephone;
@@ -72,38 +60,21 @@ describe('expect.js', function() {
expect(telephone).not.to.be.called(); expect(telephone).not.to.be.called();
}); });
});
describe('totallyWantsToSpeakToYou', function() {
var callMeMaybe;
beforeEach(function() {
callMeMaybe = sinon.spy();
});
it('reminds you that you forgot', function() { it('reminds you that you forgot', function() {
expect(function() { expect(function() {
expect(callMeMaybe).to.be.called(); expect(telephone).to.be.called();
}).to.throwException(); }).to.throwException();
}); });
it('gets moody all too quickly', function() { it('gets moody all too quickly', function() {
callMeMaybe(); telephone();
expect(function() { expect(function() {
expect(callMeMaybe).not.to.be.called(); expect(telephone).not.to.be.called();
}).to.throwException(); }).to.throwException();
}); });
}); });
describe('called and totallyWantsToSpeakToYou', function() {
it('are best friends forever \u2665', function() {
expect(expect(0).to.called).to.be(expect(1).to.totallyWantsToSpeakToYou);
});
});
describe('Test equality of XML documents - xmleql', function() { describe('Test equality of XML documents - xmleql', function() {
it('Test XML document with single root, different prefix', function() { it('Test XML document with single root, different prefix', function() {
+2 -4
View File
@@ -60,8 +60,7 @@
* @param {Number} n Number. * @param {Number} n Number.
* @param {Number} tol Tolerance. * @param {Number} tol Tolerance.
*/ */
expect.Assertion.prototype.roughlyEqual = expect.Assertion.prototype.roughlyEqual = function(n, tol) {
expect.Assertion.prototype.kindaEqual = function(n, tol) {
this.assert( this.assert(
Math.abs(this.obj - n) <= tol, Math.abs(this.obj - n) <= tol,
function() { function() {
@@ -79,8 +78,7 @@
/** /**
* Assert that a sinon spy was called. * Assert that a sinon spy was called.
*/ */
expect.Assertion.prototype.called = expect.Assertion.prototype.called = function() {
expect.Assertion.prototype.totallyWantsToSpeakToYou = function() {
this.assert( this.assert(
this.obj.called, this.obj.called,
function() { function() {