1

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.

1 Answer 1

1

The SharePoint Framework React Jest Testing sample from GitHub for your reference.

SharePoint Framework React Jest Testing sample

Reference: SharePoint Framework unit-tests with Jest

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.