Skip to content

Commit

Permalink
fix: jest
Browse files Browse the repository at this point in the history
  • Loading branch information
stackchain committed Nov 27, 2022
1 parent 003c4fa commit 5c5f08f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
9 changes: 0 additions & 9 deletions jestSetup.ts
Expand Up @@ -21,15 +21,6 @@ jest.mock('@react-native-async-storage/async-storage', () =>
jest.mock('react-native-keychain', () => {})
jest.mock('react-native-blockies-svg', () => {})

jest.mock('react-native-reanimated', () => {
const Reanimated = require('react-native-reanimated/mock')

// The mock for `call` immediately calls the callback which is incorrect
// So we override it with a no-op
Reanimated.default.call = () => {}
return Reanimated
})
jest.mock('react-native/Libraries/Animated/NativeAnimatedHelper')
jest.mock('react-native', () => {
const RN = jest.requireActual('react-native')

Expand Down
2 changes: 1 addition & 1 deletion src/auth/EncryptedStorage.test.ts
Expand Up @@ -10,7 +10,7 @@ describe('EncryptedStorage', () => {
})

it('should remove inexistent key', async () => {
await expect(ES.remove(key)).resolves.toBeFalsy()
await expect(ES.remove(key)).resolves.toBeTruthy()
})

it('should throw Error(RootKey invalid) if reading an empty key', async () => {
Expand Down

0 comments on commit 5c5f08f

Please sign in to comment.