How can I test with jest a pnp function? How can I mock the webpart context and pnp responses?
I'm using spfx webpart, pnp-js-core and jest for unit testing
Thanks.
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.
Sign up to join this communityThe SharePoint Framework React Jest Testing sample from GitHub for your reference.
SharePoint Framework React Jest Testing sample
Reference: SharePoint Framework unit-tests with Jest