增加飞飞领取短链

This commit is contained in:
yml2213
2026-07-07 21:13:37 +08:00
parent 4131d500f2
commit 58a902dd3b
12 changed files with 527 additions and 14 deletions
@@ -25,3 +25,19 @@ test('resolveKuaishouFeifeiClaimUrl does not expose local claim token fallback',
'',
)
})
test('resolveKuaishouFeifeiClaimUrl prefers internal short link', () => {
assert.equal(
resolveKuaishouFeifeiClaimUrl({
shortLink: {
code: 'AbCd1234',
url: 'https://ks.khhao.com/s/AbCd1234',
targetUrl: 'https://feifei.example.com/h5/bind?code=very-long',
},
h5: {
rechargeUrl: 'https://feifei.example.com/h5/bind?code=very-long',
},
}),
'https://ks.khhao.com/s/AbCd1234',
)
})