Skip to content

Commit

Permalink
Fix the pending exceptions test for Safari 5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Jun 6, 2015
1 parent fbbbed3 commit f7e1771
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/object.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,11 +224,13 @@ describe('Object', function () {

// Firefox 37 still has "pending exception" logic in its Object.assign implementation,
// which is 72% slower than our shim, and Firefox 40's native implementation.
var thrower = Object.preventExtensions({ 1: 2, 2: 3, 3: 4 });
var thrower = { 1: 2, 2: 3, 3: 4 };
Object.defineProperty(thrower, 2, {
get: function () { return 3; },
set: function (v) { throw new RangeError('IE 9 does not throw on preventExtensions'); }
});
Object.preventExtensions(thrower);
expect(thrower).to.have.property(2, 3);
var error;
try { Object.assign(thrower, 'wxyz'); } catch (e) { error = e; }
expect(thrower).not.to.have.property(0);
Expand Down

0 comments on commit f7e1771

Please sign in to comment.