From d90f152ebcc6f42117cb9d39928b21f8f25805ac Mon Sep 17 00:00:00 2001 From: Juliusz Gonera Date: Fri, 20 Apr 2012 19:35:21 -0400 Subject: [PATCH] fixed reserved names for old browsers in Assertion --- lib/assertion.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/assertion.js b/lib/assertion.js index 49e6f373f..9ad379deb 100644 --- a/lib/assertion.js +++ b/lib/assertion.js @@ -581,13 +581,13 @@ Assertion.prototype.a = function (type) { * * expect(Chai).to.be.an.instanceOf(Tea); * - * @name instanceof + * @name instanceOf * @param {Constructor} * @alias instanceOf * @api public */ -Assertion.prototype.instanceof = function (constructor) { +Assertion.prototype.instanceOf = function (constructor) { var name = constructor.name; this.assert( this.obj instanceof constructor @@ -868,7 +868,7 @@ Assertion.prototype.keys = function(keys) { * @api public */ -Assertion.prototype.throw = function (constructor, msg) { +Assertion.prototype.Throw = function (constructor, msg) { new Assertion(this.obj).is.a('function'); var thrown = false; @@ -1010,6 +1010,6 @@ Assertion.prototype.closeTo = function (expected, delta) { ('ownProperty', 'haveOwnProperty') ('above', 'greaterThan') ('below', 'lessThan') -('throw', 'throws') -('throw', 'Throw') // for troublesome browsers -('instanceof', 'instanceOf'); +('Throw', 'throws') +('Throw', 'throw') // for troublesome browsers +('instanceOf', 'instanceof');