test(desktop): trim salvaged pool tests to invariants

Drop two PrimaryProfilePin cases that only restate the constructor
defaults and blank-string normalisation, and the wiring-routing test that
froze POOL_LIMITS_SETTINGS_ROUTE to a literal string — a snapshot of the
constant, not a behaviour contract. The two kept pin tests cover the bug
(a live primary keeps answering for its booted profile after the stored
preference moves; teardown releases the pin), and the notifications tests
cover the toast action end-to-end.
This commit is contained in:
Teknium
2026-09-11 03:06:27 -07:00
parent 19cff347ad
commit 7dec81568e
2 changed files with 1 additions and 26 deletions
@@ -4,14 +4,6 @@ import { test } from 'vitest'
import { PrimaryProfilePin } from './primary-profile-pin'
test('with no live primary, the stored preference (or default) wins', () => {
const pin = new PrimaryProfilePin()
assert.equal(pin.resolve(() => null), 'default')
assert.equal(pin.resolve(() => ' '), 'default')
assert.equal(pin.resolve(() => 'claude'), 'claude')
})
test('a live primary keeps answering for its booted profile after the preference moves', () => {
const pin = new PrimaryProfilePin()
let preference: null | string = 'default'
@@ -37,11 +29,3 @@ test('teardown releases the pin so the next start follows the preference', () =>
assert.equal(pin.booted, null)
assert.equal(pin.resolve(() => 'claude'), 'claude')
})
test('pinning normalises blank input to default', () => {
const pin = new PrimaryProfilePin()
assert.equal(pin.pin(''), 'default')
assert.equal(pin.pin(undefined), 'default')
assert.equal(pin.pin(' grok '), 'grok')
})
@@ -1,15 +1,6 @@
import { describe, expect, it } from 'vitest'
import {
findStoredIdForRuntimeId,
POOL_LIMITS_SETTINGS_ROUTE,
resolveRoutingSessionId,
resolveSessionRpcOwner
} from './wiring-routing'
it('targets the Advanced settings surface for pool-cap recovery', () => {
expect(POOL_LIMITS_SETTINGS_ROUTE).toBe('/settings?tab=config:advanced')
})
import { findStoredIdForRuntimeId, resolveRoutingSessionId, resolveSessionRpcOwner } from './wiring-routing'
describe('findStoredIdForRuntimeId', () => {
it('reverse-resolves a runtime id to its stored id', () => {