Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

expo app with testing react-native-testing-library and jest-native "has no exported member 'toHaveProp"

$
0
0

I'm trying to use jest-native as extra matchers and i'm having an installation problem i think...
I am on a react-native ts app with expo and here are my versions:

  • expo:"~39.0.0"
  • @testing-library/react-native version:"^7.1.0"
  • jest-preset: 'jest-expo',
  • react-native version:" 63.4 "

I would like to use it in this way:

import { toHaveProp } from '@testing-library/jest-native';expect.extend({ toHaveProp });

But it gives me this error:

Module '"../../../../../../node_modules/@testing-library/jest-native/extend-expect"' has no exported member 'toHaveProp'.

any idea ?


Viewing all articles
Browse latest Browse all 6287

Trending Articles