File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 1717 * //=> true
1818 *
1919 * @example
20- * // For a value
20+ * // For an invalid date:
21+ * var result = isDate(new Date(NaN))
22+ * //=> true
23+ *
24+ * @example
25+ * // For some value:
2126 * var result = isDate('2014-02-31')
2227 * //=> false
2328 *
2429 * @example
25- * // For a object
30+ * // For an object:
2631 * var result = isDate({})
2732 * //=> false
2833 */
Original file line number Diff line number Diff line change @@ -10,6 +10,10 @@ describe('isDate', function () {
1010 assert ( isDate ( new Date ( ) ) )
1111 } )
1212
13+ it ( 'returns true if the given value is an Invalid Date' , function ( ) {
14+ assert ( isDate ( new Date ( NaN ) ) )
15+ } )
16+
1317 context ( 'with date passed from another iframe' , function ( ) {
1418 afterEach ( function ( ) {
1519 const iframe = document . getElementById ( 'iframe' )
You can’t perform that action at this time.
0 commit comments