Moves Date constructor outside of assert, so that it actually tests toISOString

This commit is contained in:
Mythri 2016-04-25 16:45:03 +01:00
parent 679d02a6ed
commit 664ec78fcc
1 changed files with 3 additions and 6 deletions

View File

@ -8,11 +8,8 @@ description: >
date is outside the valid range of time.
---*/
var date, dateStr;
// As specified in ES5 15.9.1.14, time > 8.64e15 is not in the valid range.
var date = new Date(8.64e15 + 1);
assert.throws(RangeError, function() {
// As specified in ES5 15.9.1.14, time > 8.64e15 is not in the
// valid range.
date = new Date(8.64e15 + 1);
dateStr = date.toISOString();
date.toISOString();
});