SPFx Unit Testing with newer SPFx and @pnpjs Version

49 views Asked by At

I already implemented SPFx unit testing with Jest in older SPFx projects (V. 1.11) and pnpjs v2. It was tricky, but with some good articles I made it work.

Now I tried it with the SPFx Version 1.16.1 and @pnps library version 3 and I've serveral problems.

My Question: Is there a current howto or documentation about implementing SPFx Unit Testing with Jest and the new SPFx/@pnpjs versions? Most Articles which I found are from 2018-2020...

These Articles helped my by setup for the 1.11 SPFx Version:

Howto From Elio Struyf

Sample from sp-dev-fx-webparts

To fix some problems

Thanks!

0

There are 0 answers