Skip to content

Commit

Permalink
Merge pull request #227 from taranda/master
Browse files Browse the repository at this point in the history
Add testing notes to README.md
  • Loading branch information
crazycodeboy authored Jun 12, 2018
2 parents 384698b + a24b670 commit fddb5ad
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ A splash screen API for react-native which can programatically hide and show the
- [Examples](#examples)
- [Getting started](#getting-started)
- [API](#api)
- [Testing](#testing)
- [Contribution](#contribution)
- [Changes](#changes)

Expand Down Expand Up @@ -268,6 +269,20 @@ Method | Type | Optional | Description
show() | function | false | Open splash screen (Native Method )
hide() | function | false | Close splash screen

## Testing

### Jest

For Jest to work you will need to mock this component. Here is an example:

```
// __mocks__/react-native-splash-screen.js
export default {
show: jest.fn().mockImplementation( () => { console.log('show splash screen'); } ),
hide: jest.fn().mockImplementation( () => { console.log('hide splash screen'); } ),
}
```

## Contribution

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.
Expand Down

0 comments on commit fddb5ad

Please sign in to comment.