mirror of
https://github.com/tc39/test262.git
synced 2025-07-28 08:24:23 +02:00
Test toString() behavior of invalid Dates
This commit is contained in:
parent
1f065b5b71
commit
b3115654c1
15
test/built-ins/Date/prototype/toString/invalid-date.js
vendored
Normal file
15
test/built-ins/Date/prototype/toString/invalid-date.js
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
// Copyright (C) 2017 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-todatestring
|
||||
description: Invalid Dates are rendered as "Invalid Date"
|
||||
info: >
|
||||
ToDateString ( tv )
|
||||
|
||||
...
|
||||
2. If tv is NaN, return "Invalid Date".
|
||||
...
|
||||
---*/
|
||||
|
||||
assert.sameValue(new Date(NaN).toString(), "Invalid Date");
|
Loading…
x
Reference in New Issue
Block a user