@@ -11,7 +11,6 @@ const DEFAULT_PROPS = {
1111 value : new Date ( 2010 , 3 , 7 ) ,
1212 min : new Date ( 2010 , 2 , 6 ) ,
1313 max : new Date ( 2010 , 4 , 8 ) ,
14- format : 'M' ,
1514 onSelect : ( ) => { } ,
1615}
1716
@@ -20,7 +19,7 @@ describe('DatePickerItem.js', () => {
2019 it ( 'should call componentWillMount and initialize dates of state' , ( ) => {
2120 const spyFunction = sinon . spy ( DatePickerItem . prototype , 'componentWillMount' ) ;
2221 const datePicker = mount (
23- < DatePickerItem { ...DEFAULT_PROPS } typeName = "Date " />
22+ < DatePickerItem { ...DEFAULT_PROPS } format = "D " />
2423 ) ;
2524 const dates = datePicker . state ( 'dates' ) ;
2625 sinon . assert . calledOnce ( spyFunction ) ;
@@ -35,7 +34,7 @@ describe('DatePickerItem.js', () => {
3534 it ( 'componentWillReceiveProps' , ( ) => {
3635 const spyFunction = sinon . spy ( DatePickerItem . prototype , 'componentWillReceiveProps' ) ;
3736 const datePicker = mount (
38- < DatePickerItem { ...DEFAULT_PROPS } typeName = "Date " />
37+ < DatePickerItem { ...DEFAULT_PROPS } format = "D " />
3938 ) ;
4039 datePicker . setProps ( { date : new Date ( 2010 , 3 , 10 ) } ) ;
4140 const dates = datePicker . state ( 'dates' ) ;
@@ -51,7 +50,7 @@ describe('DatePickerItem.js', () => {
5150 it ( 'shouldComponentUpdate' , ( ) => {
5251 const spyFunction = sinon . spy ( DatePickerItem . prototype , 'shouldComponentUpdate' ) ;
5352 const datePicker = mount (
54- < DatePickerItem { ...DEFAULT_PROPS } typeName = "Date " />
53+ < DatePickerItem { ...DEFAULT_PROPS } format = "D " />
5554 ) ;
5655
5756 datePicker . setProps ( { value : new Date ( 2010 , 3 , 10 ) } ) ;
@@ -65,7 +64,7 @@ describe('DatePickerItem.js', () => {
6564 it ( 'should call handleContent three times after touching' , ( ) => {
6665 const spyFunction = sinon . spy ( DatePickerItem . prototype , 'handleContentTouch' ) ;
6766 const datePicker = mount (
68- < DatePickerItem { ...DEFAULT_PROPS } typeName = "Date " />
67+ < DatePickerItem { ...DEFAULT_PROPS } format = "D " />
6968 ) ;
7069
7170 const touchstartEvent = {
@@ -93,7 +92,7 @@ describe('DatePickerItem.js', () => {
9392 it ( 'should analyzing the right direction' , ( ) => {
9493 const spyFunction = sinon . spy ( DatePickerItem . prototype , '_moveToNext' ) ;
9594 const datePicker = mount (
96- < DatePickerItem { ...DEFAULT_PROPS } typeName = "Date " />
95+ < DatePickerItem { ...DEFAULT_PROPS } format = "D " />
9796 ) ;
9897 const touchstartEvent = {
9998 targetTouches : [ { pageY : 0 } ] ,
@@ -110,7 +109,7 @@ describe('DatePickerItem.js', () => {
110109 expect ( spyFunction . getCall ( 0 ) . args [ 0 ] ) . to . equal ( - 1 ) ;
111110
112111 const datePicker2 = mount (
113- < DatePickerItem { ...DEFAULT_PROPS } typeName = "Date " />
112+ < DatePickerItem { ...DEFAULT_PROPS } format = "D " />
114113 ) ;
115114 const touchstartEvent2 = {
116115 targetTouches : [ { pageY : 0 } ] ,
@@ -132,7 +131,7 @@ describe('DatePickerItem.js', () => {
132131 it ( 'should update dates of state, When the sliding more than 20' , ( ) => {
133132 const spyFunction = sinon . spy ( DatePickerItem . prototype , '_updateDates' ) ;
134133 const datePicker = mount (
135- < DatePickerItem { ...DEFAULT_PROPS } typeName = "Date " />
134+ < DatePickerItem { ...DEFAULT_PROPS } format = "D " />
136135 ) ;
137136 const touchstartEvent = {
138137 targetTouches : [ { pageY : 0 } ] ,
@@ -161,7 +160,7 @@ describe('DatePickerItem.js', () => {
161160
162161 const spyFunction = sinon . spy ( DatePickerItem . prototype , '_moveTo' ) ;
163162 const datePicker = mount (
164- < DatePickerItem { ...props } typeName = "Date " />
163+ < DatePickerItem { ...props } format = "D " />
165164 ) ;
166165
167166 const touchstartEvent = {
0 commit comments