style: satisfy the eslint lane on the plan surfaces
Drop the assertions eslint proved unnecessary (getByRole gains the element type parameter instead, keeping tsc satisfied), declare the injected setPlanMode as a function property (the seat face is this-free), and narrow the fixture's command args without String()'s object stringification arm.
This commit is contained in:
@@ -314,7 +314,8 @@ function foldPlan(log: readonly SessionEvent[]): { active: boolean; pending: boo
|
||||
for (const event of log) {
|
||||
const item = event as unknown as { type: string; data?: Record<string, unknown> }
|
||||
if (item.type === 'command/run' && item.data?.['name'] === 'plan') {
|
||||
wanted = String(item.data['args'] ?? '').trim() !== 'off'
|
||||
const args = item.data['args']
|
||||
wanted = (typeof args === 'string' ? args : '').trim() !== 'off'
|
||||
} else if (item.type === 'plan/mode') {
|
||||
active = item.data?.['active'] === true
|
||||
wanted = null
|
||||
|
||||
Reference in New Issue
Block a user