Skip to content

Commit

Permalink
Integrate react-native-reorderable-list
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon-edge committed Nov 12, 2024
1 parent 2b92d5a commit 524c151
Show file tree
Hide file tree
Showing 8 changed files with 297 additions and 242 deletions.
5 changes: 5 additions & 0 deletions jestSetup.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,3 +254,8 @@ jest.mock('react-native-device-info', () => {
getVersion: jest.fn()
}
})

jest.mock('react-native-reorderable-list', () => ({
...jest.requireActual('react-native-reorderable-list'),
useReorderableDrag: () => jest.fn()
}))
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@
"react-native-contacts": "^7.0.4",
"react-native-custom-tabs": "https://github.com/adminphoeniixx/react-native-custom-tabs#develop",
"react-native-device-info": "^13.2.0",
"react-native-draggable-flatlist": "^4.0.1",
"react-native-email-link": "^1.14.5",
"react-native-fast-image": "^8.5.11",
"react-native-fast-shadow": "^0.1.0",
Expand All @@ -145,6 +144,7 @@
"react-native-permissions": "^4.1.5",
"react-native-piratechain": "^0.5.4",
"react-native-reanimated": "^3.14.0",
"react-native-reorderable-list": "^0.5.0",
"react-native-safari-view": "^2.1.0",
"react-native-safe-area-context": "^4.10.1",
"react-native-screens": "^3.31.1",
Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/components/WalletListSortableRow.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe('WalletListSortableRow', () => {
it('should render with loading wallet', () => {
const renderer = TestRenderer.create(
<FakeProviders>
<WalletListSortableRow wallet={undefined} onDrag={() => {}} />
<WalletListSortableRow wallet={undefined} />
</FakeProviders>
)
expect(renderer.toJSON()).toMatchSnapshot()
Expand Down Expand Up @@ -48,7 +48,7 @@ describe('WalletListSortableRow', () => {

const renderer = TestRenderer.create(
<FakeProviders initialState={fakeState}>
<WalletListSortableRow wallet={fakeWallet} onDrag={() => {}} />
<WalletListSortableRow wallet={fakeWallet} />
</FakeProviders>
)
expect(renderer.toJSON()).toMatchSnapshot()
Expand Down
Loading

0 comments on commit 524c151

Please sign in to comment.