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:
@@ -42,7 +42,7 @@ async function harness(withPlanMode: boolean): Promise<Bench> {
|
||||
return {
|
||||
ctx,
|
||||
session,
|
||||
values: () => ctx.sessionProjections.snapshot(session).values as Record<string, unknown>,
|
||||
values: () => ctx.sessionProjections.snapshot(session).values,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ describe('plan projection unit', () => {
|
||||
const cold = await harness(true)
|
||||
for (const event of bench.session.events) {
|
||||
if (event.type === 'command/run' || event.type === 'plan/mode') {
|
||||
cold.session.append(event.type, event.data as never)
|
||||
cold.session.append(event.type, event.data)
|
||||
}
|
||||
}
|
||||
expect(cold.values().plan).toEqual({ active: false, pending: true })
|
||||
|
||||
Reference in New Issue
Block a user