web-planer
web-planer copied to clipboard
Feat/vitest testing library msw
Adding tests setup
- vitest
- react-testing-library
- msw
[!IMPORTANT] Introduces Vitest, React Testing Library, and MSW for testing with new test files, mock handlers, and configuration updates.
- Testing Setup:
- Introduces
vitest,react-testing-library, andmswfor testing.- Adds
vitest.config.mtsfor Vitest configuration withjsdomenvironment and setup files.- Tests:
- Adds
plans-edit.test.tsxto test error handling inCreateNewPlanPage.- Adds
plans.test.tsxto test error handling inPlanItem.- Mocks:
- Adds
handlers.tsandserver.tsfor MSW mock server setup.- Mock handlers simulate API errors for departments, registrations, and course loading.
- Scripts:
- Updates
package.jsonscripts to includevitestcommands for testing.- Misc:
- Adds error toast in
app-sidebar.tsxfor registration fetch failures.- Adds
setup.tsfor test environment setup with global mocks and server lifecycle management.This description was created by
for 463a6dd97ce70c6114bac29e05f4609298163c73. You can customize this summary. It will automatically update as commits are pushed.
I know it isn't the prettiest code but for now I'm tired and don't have energy for it