mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 01:06:00 +03:00
[PR #4969] [MERGED] test(backend): account for race conditions in verifyMagicLinkTokens test suite #5006
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#5006
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/hoppscotch/hoppscotch/pull/4969
Author: @mirarifhasan
Created: 4/8/2025
Status: ✅ Merged
Merged: 4/8/2025
Merged by: @jamesgeorge007
Base:
patch← Head:fix/auth-test-case📝 Commits (1)
5dcda05test: verifyMagicLinkTokens test case fix📊 Changes
1 file changed (+4 additions, -3 deletions)
View changed files
📝
packages/hoppscotch-backend/src/auth/auth.service.spec.ts(+4 -3)📄 Description
Closes #4964
What's changed
This PR fixes a test case for the
verifyMagicLinkTokensfunction.The test case was related to a timestamp issue, which is difficult to reproduce unless the test runs on a very fast machine.
Explanatiton
Most of the time when we run the tests,
expiresOnbecomes slightly outdated by the time and the test function passes.Whenever you use a fast machine,
expiresOnmay hold the current time, which can trigger an error in subsequent functions.Notes to reviewers
Nil
How to Test
Just run the followed cmds
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.