Skip to content

Commit

Permalink
Update forin fixture to include common and future "has" cases.
Browse files Browse the repository at this point in the history
  • Loading branch information
rwaldron committed Aug 31, 2014
1 parent 07316f7 commit 132d64b
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions tests/unit/fixtures/forin.js
@@ -1,7 +1,21 @@
for (var key in objects) {
if (objects.hasOwnProperty(key)) {
hey();
}
if (objects.hasOwnProperty(key)) {
hey();
}
}

var hasOwn = Object.prototype.hasOwnProperty;

for (var p in o) {
if (hasOwn.call(o, p)) {
hey();
}
}

for (var p in o) {
if (Reflect.has(o, p)) {
hey();
}
}

// Empty for in block like the one found in jQuery
Expand All @@ -13,3 +27,4 @@ for ( key in objects ) { }
for (key in objects) {
hey();
}

0 comments on commit 132d64b

Please sign in to comment.