File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change 1+ /**
2+ * @format
3+ */
4+
5+ import 'react-native' ;
6+ import React from 'react' ;
7+ import Progress from '../lib/Progress' ;
8+ // Note: test renderer must be required after react-native.
9+ import renderer from 'react-test-renderer' ;
10+ import { run } from '../lib/Progress/svg' ;
11+
12+ it ( 'Progress' , ( ) => {
13+ const component = renderer . create (
14+ < Progress
15+ progress = { 30 }
16+ position = "fixed"
17+ progressColor = "#108ee9"
18+ animation = { { duration : 1000 } }
19+ xml = { run }
20+ iconShow = { true }
21+ size = { 25 }
22+ progressShow = { true }
23+ /> ,
24+ ) ;
25+ expect ( component . root . props . progress ) . toBe ( 30 ) ;
26+ expect ( component . root . props . position ) . toBe ( 'fixed' ) ;
27+ expect ( component . root . props . progressColor ) . toBe ( '#108ee9' ) ;
28+ expect ( component . root . props . animation . duration ) . toBe ( 1000 ) ;
29+ expect ( component . root . props . iconShow ) . toBeTruthy ( ) ;
30+ expect ( component . root . props . xml ) . toStrictEqual ( run ) ;
31+ expect ( component . root . props . size ) . toBe ( 25 ) ;
32+ expect ( component . root . props . progressShow ) . toBeTruthy ( ) ;
33+ } ) ;
You can’t perform that action at this time.
0 commit comments