Skip to content

Commit

Permalink
exercise hasOwnProperty path
Browse files Browse the repository at this point in the history
  • Loading branch information
James Halliday committed Aug 5, 2014
1 parent b0eceee commit 8d753fb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/values.js
Expand Up @@ -6,3 +6,11 @@ test('values', function (t) {
var obj = [ {}, [], { 'a-b': 5 } ];
t.equal(inspect(obj), '[ {}, [], { \'a-b\': 5 } ]');
});

test('has', function (t) {
t.plan(1);
var has = Object.prototype.hasOwnProperty;
delete Object.prototype.hasOwnProperty;
t.equal(inspect({ a: 1, b: 2 }), '{ a: 1, b: 2 }');
Object.prototype.hasOwnProperty = has;
});

0 comments on commit 8d753fb

Please sign in to comment.