fix: qr code show not found exception handling #107
Merged
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.
This pull request includes changes to enhance error handling in the
QrScanner
component and adds extensive unit tests for Firebase-related functions. The most important changes include improved error messaging for QR code scanning, and the addition of unit tests for Firebase server functions and user data retrieval.Error handling improvements:
src/lib/components/QrScanner.svelte
: Enhanced error messaging for QR code scanning by checking forNotFoundException
and providing more specific error messages. [1] [2]Unit tests for Firebase functions:
tests/firebase.test.ts
: Added unit tests forgetGroupsData
,getSessionData
, andcheckRemoveParticipantPermission
functions, including mock implementations for Firestore interactions.tests/getUser.test.ts
: Added unit tests for thegetUser
function, including mock implementations for Firestore interactions and caching behavior.