File tree 1 file changed +15
-0
lines changed
1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ A splash screen API for react-native which can programatically hide and show the
16
16
- [ Examples] ( #examples )
17
17
- [ Getting started] ( #getting-started )
18
18
- [ API] ( #api )
19
+ - [ Testing] ( #testing )
19
20
- [ Contribution] ( #contribution )
20
21
- [ Changes] ( #changes )
21
22
@@ -268,6 +269,20 @@ Method | Type | Optional | Description
268
269
show() | function | false | Open splash screen (Native Method )
269
270
hide() | function | false | Close splash screen
270
271
272
+ ## Testing
273
+
274
+ ### Jest
275
+
276
+ For Jest to work you will need to mock this component. Here is an example:
277
+
278
+ ```
279
+ // __mocks__/react-native-splash-screen.js
280
+ export default {
281
+ show: jest.fn().mockImplementation( () => { console.log('show splash screen'); } ),
282
+ hide: jest.fn().mockImplementation( () => { console.log('hide splash screen'); } ),
283
+ }
284
+ ```
285
+
271
286
## Contribution
272
287
273
288
Issues are welcome. Please add a screenshot of you bug and a code snippet. Quickest way to solve issue is to reproduce it in one of the examples.
You can’t perform that action at this time.
0 commit comments