@@ -11,7 +11,6 @@ const DEFAULT_PROPS = {
11
11
value : new Date ( 2010 , 3 , 7 ) ,
12
12
min : new Date ( 2010 , 2 , 6 ) ,
13
13
max : new Date ( 2010 , 4 , 8 ) ,
14
- format : 'M' ,
15
14
onSelect : ( ) => { } ,
16
15
}
17
16
@@ -20,7 +19,7 @@ describe('DatePickerItem.js', () => {
20
19
it ( 'should call componentWillMount and initialize dates of state' , ( ) => {
21
20
const spyFunction = sinon . spy ( DatePickerItem . prototype , 'componentWillMount' ) ;
22
21
const datePicker = mount (
23
- < DatePickerItem { ...DEFAULT_PROPS } typeName = "Date " />
22
+ < DatePickerItem { ...DEFAULT_PROPS } format = "D " />
24
23
) ;
25
24
const dates = datePicker . state ( 'dates' ) ;
26
25
sinon . assert . calledOnce ( spyFunction ) ;
@@ -35,7 +34,7 @@ describe('DatePickerItem.js', () => {
35
34
it ( 'componentWillReceiveProps' , ( ) => {
36
35
const spyFunction = sinon . spy ( DatePickerItem . prototype , 'componentWillReceiveProps' ) ;
37
36
const datePicker = mount (
38
- < DatePickerItem { ...DEFAULT_PROPS } typeName = "Date " />
37
+ < DatePickerItem { ...DEFAULT_PROPS } format = "D " />
39
38
) ;
40
39
datePicker . setProps ( { date : new Date ( 2010 , 3 , 10 ) } ) ;
41
40
const dates = datePicker . state ( 'dates' ) ;
@@ -51,7 +50,7 @@ describe('DatePickerItem.js', () => {
51
50
it ( 'shouldComponentUpdate' , ( ) => {
52
51
const spyFunction = sinon . spy ( DatePickerItem . prototype , 'shouldComponentUpdate' ) ;
53
52
const datePicker = mount (
54
- < DatePickerItem { ...DEFAULT_PROPS } typeName = "Date " />
53
+ < DatePickerItem { ...DEFAULT_PROPS } format = "D " />
55
54
) ;
56
55
57
56
datePicker . setProps ( { value : new Date ( 2010 , 3 , 10 ) } ) ;
@@ -65,7 +64,7 @@ describe('DatePickerItem.js', () => {
65
64
it ( 'should call handleContent three times after touching' , ( ) => {
66
65
const spyFunction = sinon . spy ( DatePickerItem . prototype , 'handleContentTouch' ) ;
67
66
const datePicker = mount (
68
- < DatePickerItem { ...DEFAULT_PROPS } typeName = "Date " />
67
+ < DatePickerItem { ...DEFAULT_PROPS } format = "D " />
69
68
) ;
70
69
71
70
const touchstartEvent = {
@@ -93,7 +92,7 @@ describe('DatePickerItem.js', () => {
93
92
it ( 'should analyzing the right direction' , ( ) => {
94
93
const spyFunction = sinon . spy ( DatePickerItem . prototype , '_moveToNext' ) ;
95
94
const datePicker = mount (
96
- < DatePickerItem { ...DEFAULT_PROPS } typeName = "Date " />
95
+ < DatePickerItem { ...DEFAULT_PROPS } format = "D " />
97
96
) ;
98
97
const touchstartEvent = {
99
98
targetTouches : [ { pageY : 0 } ] ,
@@ -110,7 +109,7 @@ describe('DatePickerItem.js', () => {
110
109
expect ( spyFunction . getCall ( 0 ) . args [ 0 ] ) . to . equal ( - 1 ) ;
111
110
112
111
const datePicker2 = mount (
113
- < DatePickerItem { ...DEFAULT_PROPS } typeName = "Date " />
112
+ < DatePickerItem { ...DEFAULT_PROPS } format = "D " />
114
113
) ;
115
114
const touchstartEvent2 = {
116
115
targetTouches : [ { pageY : 0 } ] ,
@@ -132,7 +131,7 @@ describe('DatePickerItem.js', () => {
132
131
it ( 'should update dates of state, When the sliding more than 20' , ( ) => {
133
132
const spyFunction = sinon . spy ( DatePickerItem . prototype , '_updateDates' ) ;
134
133
const datePicker = mount (
135
- < DatePickerItem { ...DEFAULT_PROPS } typeName = "Date " />
134
+ < DatePickerItem { ...DEFAULT_PROPS } format = "D " />
136
135
) ;
137
136
const touchstartEvent = {
138
137
targetTouches : [ { pageY : 0 } ] ,
@@ -161,7 +160,7 @@ describe('DatePickerItem.js', () => {
161
160
162
161
const spyFunction = sinon . spy ( DatePickerItem . prototype , '_moveTo' ) ;
163
162
const datePicker = mount (
164
- < DatePickerItem { ...props } typeName = "Date " />
163
+ < DatePickerItem { ...props } format = "D " />
165
164
) ;
166
165
167
166
const touchstartEvent = {
0 commit comments