mirror of
https://github.com/stablyai/orca.git
synced 2026-10-24 00:04:01 +00:00
test(relay): mirror production epoch escaping in testPtyId
The harness built the expected id without the encodeURIComponent production applies at the mint site. A test epoch carrying a reserved character would diverge silently across ~40 assertions in 11 files.
This commit is contained in:
@@ -6,8 +6,10 @@ import type { RelayDispatcher } from './dispatcher'
|
||||
|
||||
export const TEST_PTY_ID_MINT_EPOCH = 'test-mint-epoch'
|
||||
|
||||
// Why encoded: production escapes the epoch at the mint site. A test epoch with a
|
||||
// reserved character would otherwise diverge silently across ~40 assertions.
|
||||
export function testPtyId(sequence: number): string {
|
||||
return `pty2:${TEST_PTY_ID_MINT_EPOCH}:${sequence}`
|
||||
return `pty2:${encodeURIComponent(TEST_PTY_ID_MINT_EPOCH)}:${sequence}`
|
||||
}
|
||||
|
||||
export function createTestPtyHandler(dispatcher: MockDispatcher): PtyHandler {
|
||||
|
||||
Reference in New Issue
Block a user