Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
jorbuedo committed May 8, 2024
1 parent 715caa9 commit 2b4b5e9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
6 changes: 4 additions & 2 deletions apps/wallet-mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,15 @@
"json",
"node"
],
"moduleNameMapper": {
"^react-native$": "<rootDir>/../../node_modules/react-native"
},
"preset": "react-native",
"setupFiles": [
"<rootDir>/jestSetup.ts"
],
"transformIgnorePatterns": [
"node_modules/(?!(jest-)?(@react-native|react-native|react-native-iphone-x-helper|react-native-color-picker|react-native-reanimated|react-native-linear-gradient|react-native-mmkv)/)",
"node_modules/(?!@testing-library/react-native)/"
"node_modules/(?!(jest-)?(@react-native|react-native|react-native-iphone-x-helper|react-native-color-picker|react-native-reanimated|react-native-linear-gradient|react-native-mmkv)/)"
]
},
"dependencies": {
Expand Down
6 changes: 1 addition & 5 deletions apps/wallet-mobile/src/metrics/metricsManager.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable @typescript-eslint/require-await */
import {act, render} from '@testing-library/react-native'
import {render} from '@testing-library/react-native'
import * as React from 'react'
import {Text, View} from 'react-native'

Expand Down Expand Up @@ -30,10 +30,6 @@ describe('MetricsProvider', () => {
</MetricsProvider>,
)

await act(async () => {
jest.advanceTimersByTime(1000)
})

expect(await findByText('Loaded')).toBeTruthy()
expect(metricsManager.init).toHaveBeenCalled()
expect(metricsManager.enabled).toHaveBeenCalled()
Expand Down

0 comments on commit 2b4b5e9

Please sign in to comment.