mirror of
https://github.com/stablyai/orca.git
synced 2026-10-28 00:02:54 +00:00
* refactor(rate-limits): split Codex and Claude fetchers * refactor(rate-limits): restore base error-message defaulting The split moved the 'Unknown error' fallback from inside String() to the call site, which changed behavior for an Error with an empty .message: base surfaced '', head surfaced 'Unknown error'. Restore the base form.
20 lines
587 B
TypeScript
20 lines
587 B
TypeScript
import { describe, expect, it } from 'vitest'
|
|
import { parseCodexPtyStatus } from './codex-pty-status-parser'
|
|
|
|
describe('Codex PTY status parser', () => {
|
|
it('uses the account row orientation and reset when a model-scoped weekly row renders first', () => {
|
|
const result = parseCodexPtyStatus(
|
|
'GPT-5.3-Codex-Spark Weekly limit: 100% left (resets in 1d 2h)\n' +
|
|
'Weekly limit: 43% left (resets in 5d 3h)\n'
|
|
)
|
|
|
|
expect(result).toMatchObject({
|
|
session: null,
|
|
weekly: {
|
|
usedPercent: 57,
|
|
resetDescription: '5d 3h'
|
|
}
|
|
})
|
|
})
|
|
})
|