Skip to content

Commit

Permalink
test: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasFridmansky authored and Lipo11 committed Nov 14, 2023
1 parent 764d1bb commit 700b7c5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions .husky/commit-msg
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
. "$(dirname -- "$0")/_/husky.sh"

npx --no -- commitlint --edit ${1}
npm run test
13 changes: 13 additions & 0 deletions tests/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,17 @@ describe( 'Instagram Stories test', () => {

} );

it( 'Should work with empty array', async () => {

render( <InstagramStories stories={[ {
id: '1',
name: 'John Doe',
imgUrl: 'https://picsum.photos/200/300',
stories: [],
} ]} /> );

} );

it( 'Should work with video & default duration', async () => {

const { getByTestId } = render( <InstagramStories stories={stories4} videoAnimationMaxDuration={1000} /> );
Expand Down Expand Up @@ -520,6 +531,8 @@ describe( 'Story Image test', () => {

it( 'Should work if story already loaded', async () => {

jest.spyOn(Reanimated, 'useSharedValue').mockImplementation((value) => ({ value: value === true ? false : value }));

const onLoad = jest.fn();

render( <StoryImage
Expand Down

0 comments on commit 700b7c5

Please sign in to comment.