Demonstration of Unit Testing for SPFx React based on the work of Marcin Wojciechowski in the project spfx-webpart. I will create branches based on various versions of the SPFX framework.
Get your own free development tenant by subscribing to Microsoft 365 developer program
Any special pre-requisites?
Solution | Author |
---|---|
spfx-react-jest-testing | Kurt Opel |
Version | Date | Comments |
---|---|---|
1.17.2 | July 15, 2024 | |
1.17.4 | July 15, 2024 | |
1.18.2 | July 15, 2024 | Had to update fluent ui references in ItemsWithAdminInfo.tsx. |
1.19.0 | July 16, 2024 |
THIS CODE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
- Clone this repository
- Ensure that you are at the solution folder
- Update the serve.json file with the url of your test site
- in the command-line run:
- npm install
- gulp serve
- To run the tests, run
npx jest
- Getting started with SharePoint Framework
- Building for Microsoft teams
- Use Microsoft Graph in your solution
- Publish SharePoint Framework applications to the Marketplace
- Microsoft 365 Patterns and Practices - Guidance, tooling, samples and open-source controls for your Microsoft 365 development