File tree 2 files changed +7
-3
lines changed
2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 1
1
import React from 'react' ; // eslint-disable-line no-unused-vars
2
- import { mount } from 'enzyme' ;
2
+ import { mount , shallow } from 'enzyme' ;
3
3
import Datetime from '../DateTime' ; // eslint-disable-line no-unused-vars
4
4
5
5
const simulateClickOnElement = ( element ) => {
@@ -16,6 +16,10 @@ module.exports = {
16
16
return mount ( < Datetime { ...props } /> ) ;
17
17
} ,
18
18
19
+ createDatetimeShallow : ( props ) => {
20
+ return shallow ( < Datetime { ...props } /> ) ;
21
+ } ,
22
+
19
23
/*
20
24
* Click Simulations
21
25
*/
Original file line number Diff line number Diff line change @@ -374,8 +374,8 @@ describe('Datetime', () => {
374
374
expect ( utils . isTimeView ( component ) ) . toBeTruthy ( ) ;
375
375
} ) ;
376
376
377
- xit ( 'className -> type string' , ( ) => {
378
- const component = utils . createDatetime ( { className : 'custom-class' } ) ;
377
+ it ( 'className -> type string' , ( ) => {
378
+ const component = utils . createDatetimeShallow ( { className : 'custom-class' } ) ;
379
379
expect ( component . find ( '.custom-class' ) . length ) . toEqual ( 1 ) ;
380
380
} ) ;
381
381
You can’t perform that action at this time.
0 commit comments