Merge pull request #818 from shvaikalesh/master

Use utils.type for `arguments` check
This commit is contained in:
Grant Snodgrass 2016-10-03 07:05:49 -04:00 committed by GitHub
commit b99fae70f6

View file

@ -8,7 +8,6 @@
module.exports = function (chai, _) {
var Assertion = chai.Assertion
, AssertionError = chai.AssertionError
, toString = Object.prototype.toString
, flag = _.flag;
/**
@ -166,7 +165,7 @@ module.exports = function (chai, _) {
Assertion.addProperty('any', function () {
flag(this, 'any', true);
flag(this, 'all', false)
flag(this, 'all', false);
});
@ -577,9 +576,9 @@ module.exports = function (chai, _) {
function checkArguments () {
var obj = flag(this, 'object')
, type = Object.prototype.toString.call(obj);
, type = _.type(obj);
this.assert(
'[object Arguments]' === type
'arguments' === type
, 'expected #{this} to be arguments but got ' + type
, 'expected #{this} to not be arguments'
);