@@ -15,14 +15,15 @@ QUnit.test( "Instantiation", function( assert ) {
15
15
assert . ok ( $ . ui . date ( null , attributes ) instanceof $ . ui . date , "instantiation without new" ) ;
16
16
} ) ;
17
17
18
- QUnit . test ( "Check Sets and Gets" , 4 , function ( assert ) {
18
+ QUnit . test ( "Check Sets and Gets" , 6 , function ( assert ) {
19
19
var date = $ . ui . date ( null , attributes ) ;
20
- assert . equal ( date . setDay ( 15 ) . day ( ) , 15 , "Set day and retrieve" ) ;
21
20
assert . equal ( date . setFullDate ( 2012 , 9 , 15 ) . year ( ) , 2012 , "Set full date and retrieve year" ) ;
22
21
assert . equal ( date . month ( ) , 9 , "Set full date and retrieve month" ) ;
23
22
assert . equal ( date . day ( ) , 15 , "Set full date and retrieve day" ) ;
24
23
25
- // TODO Add setTime test
24
+ assert . equal ( date . setTimestamp ( 1490912843735 ) . year ( ) , 2017 , "Set timestamp and retrieve year" ) ;
25
+ assert . equal ( date . month ( ) , 2 , "Set timestamp and retrieve month" ) ;
26
+ assert . equal ( date . day ( ) , 31 , "Set timestamp and retrieve day" ) ;
26
27
} ) ;
27
28
28
29
QUnit . test ( "Date Adjustments - Normal Use Cases" , 10 , function ( assert ) {
@@ -119,8 +120,6 @@ QUnit.test( "Clone", 2, function( assert ) {
119
120
} ) ;
120
121
121
122
QUnit . test ( "Days" , 1 , function ( assert ) {
122
-
123
- // TODO Needs work
124
123
var date = $ . ui . date ( null , attributes ) ;
125
124
date . eachDay = function ( day ) {
126
125
if ( day . lead && day . date > 20 ) {
0 commit comments