test(liveshare): derive owner credential horizons from the real clock
The spec hardcoded a live horizon of 2026-11-14, which the host compares with Date.now(), so it failed from that date on. Fixes #8465 (cherry picked from commit 252959b3cd8e33c5691c85980cdc7bf305cc0a4b)
This commit is contained in:
1 parent
74b0e1d908
commit
0f0cd323c4
1 file changed
+4
-3
@@ -17,9 +17,10 @@ import { describe, expect, it, onTestFinished } from 'vitest'
|
||||
import type {} from '../src/index.ts'
|
||||
import { apply } from '../src/host/share-host.ts'
|
||||
|
||||
const START = Date.parse('2026-10-15T00:00:00.000Z')
|
||||
const PAST = new Date(START).toISOString()
|
||||
const LIVE = new Date(START + 30 * 24 * 60 * 60_000).toISOString()
|
||||
// The host compares horizons with the real clock, so both instants are relative to it.
|
||||
const DAY = 24 * 60 * 60_000
|
||||
const PAST = new Date(Date.now() - DAY).toISOString()
|
||||
const LIVE = new Date(Date.now() + 30 * DAY).toISOString()
|
||||
const STORED_TOKEN = 'stored-payload.stored-signature'
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user