Conversation
Replace axios library mocking with MSW (Mock Service Worker) to intercept HTTP requests at the network level. This prepares for replacing axios with fetch, as MSW works with both. - Add msw as dev dependency - Create msw-handlers.ts with default API response handlers - Create msw-server.ts to set up the test server - Update test-setup.ts to start/stop MSW server - Migrate UserProvider.test.tsx from axios mocks to MSW - Migrate App.test.tsx from axios mocks to MSW - Remove duplicate "unresponsive server" test (same behavior as network error) - Add passthrough handler for socket.io polling requests Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Phase 2 of axios migration: Add comprehensive test coverage for components that use HTTP calls before replacing axios with fetch. - SyncManager.test.tsx: 10 tests covering sync flow, error handling, socket events - UserAuthenticationWidget.test.tsx: 11 tests for login, signup, validation - About.test.tsx: 2 tests for basic rendering - Extended MockDatabase interface with info, changes, allDocs, bulkDocs methods - Updated CLAUDE.md with guidance on magic numbers and type assertions Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove axios dependency and migrate all HTTP calls to use the native fetch API with AbortController for timeouts. This simplifies the codebase by removing an external dependency for straightforward HTTP operations. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
fetchAPIAbortControllerfor request timeouts (replacingaxios.CancelToken)response.okchecks instead of axios error throwingFiles changed
Test plan
yarn checkpasses🤖 Generated with Claude Code