Age Assurance V2 (#9479)
* Age Assurance V2 * Tighten up test * Add todos for sdk migration * Align RQ versions * Use useEffect for side effect * Improve effects, memoize * Standarize on birthdate * Copy feedback * Copilot * Add support link * Reove double .. * Cleanup * Remove redirect dialog * Cleanup todos, add comments * Update splash in main template too * Mock some stuff * Exhaustive checks Co-authored-by: Samuel Newman <mozzius@protonmail.com> * Exhaustive checks Co-authored-by: Samuel Newman <mozzius@protonmail.com> * Small fix to bday handling * Add comment * onboarding style tweak sneaking this in sorry! * rm unreachable breaks * Put useIntentHandler back on web * Remove misleading success set * Align on birthdate --------- Co-authored-by: Samuel Newman <mozzius@protonmail.com>
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import {describe, expect, it} from '@jest/globals'
|
||||
|
||||
import {parseLinkingUrl} from '../parseLinkingUrl'
|
||||
|
||||
describe('parseLinkingUrl', () => {
|
||||
it('should correctly parse bluesky:// URLs', () => {
|
||||
const url =
|
||||
'bluesky://intent/age-assurance?result=success&actorDid=did:example:123'
|
||||
const urlp = parseLinkingUrl(url)
|
||||
expect(urlp.protocol).toBe('bluesky:')
|
||||
expect(urlp.host).toBe('')
|
||||
expect(urlp.pathname).toBe('/intent/age-assurance')
|
||||
})
|
||||
|
||||
it('should correctly parse standard URLs', () => {
|
||||
const url =
|
||||
'https://bsky.app/intent/age-assurance?result=success&actorDid=did:example:123'
|
||||
const urlp = parseLinkingUrl(url)
|
||||
expect(urlp.protocol).toBe('https:')
|
||||
expect(urlp.host).toBe('bsky.app')
|
||||
expect(urlp.pathname).toBe('/intent/age-assurance')
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user