File tree Expand file tree Collapse file tree 2 files changed +34
-1
lines changed
android/src/main/java/com/effx/secureview Expand file tree Collapse file tree 2 files changed +34
-1
lines changed Original file line number Diff line number Diff line change @@ -12,4 +12,8 @@ class SecureViewPackage : ReactPackage {
1212 viewManagers.add(SecureViewManager ())
1313 return viewManagers
1414 }
15+
16+ override fun createNativeModules (reactContext : ReactApplicationContext ): List <NativeModule > {
17+ return emptyList()
18+ }
1519}
Original file line number Diff line number Diff line change 1- it . todo ( 'write a test' ) ;
1+ import { render } from '@testing-library/react-native' ;
2+ import SecureView from './SecureView' ;
3+
4+ describe ( 'SecureView' , ( ) => {
5+ it ( 'renders without crashing' , ( ) => {
6+ const { getByTestId } = render ( < SecureView testID = "secure-view" /> ) ;
7+ expect ( getByTestId ( 'secure-view' ) ) . toBeTruthy ( ) ;
8+ } ) ;
9+
10+ it ( 'renders with enable prop set to true' , ( ) => {
11+ const { getByTestId } = render (
12+ < SecureView testID = "secure-view" enable = { true } />
13+ ) ;
14+ expect ( getByTestId ( 'secure-view' ) ) . toBeTruthy ( ) ;
15+ } ) ;
16+
17+ it ( 'renders with enable prop set to false' , ( ) => {
18+ const { getByTestId } = render (
19+ < SecureView testID = "secure-view" enable = { false } />
20+ ) ;
21+ expect ( getByTestId ( 'secure-view' ) ) . toBeTruthy ( ) ;
22+ } ) ;
23+
24+ it ( 'accepts standard View props' , ( ) => {
25+ const { getByTestId } = render (
26+ < SecureView testID = "secure-view" style = { { backgroundColor : 'red' } } />
27+ ) ;
28+ expect ( getByTestId ( 'secure-view' ) ) . toBeTruthy ( ) ;
29+ } ) ;
30+ } ) ;
You can’t perform that action at this time.
0 commit comments