@sheetwrite/core/testinginterface
The stub 2D context the canvas test stubs install: every method is a no-op
that counts its invocations in calls, so tests can assert paint activity
(e.g. ctx.calls.fillText > 0) without a real canvas.
Members 8
calls Per-method invocation counts, keyed by the 2D-context method name.
readonly calls: Record<string, number>;fillStyle
fillStyle: string;strokeStyle
strokeStyle: string;font
font: string;textAlign
textAlign: string;textBaseline
textBaseline: string;lineWidth
lineWidth: number;index
[method: string]: unknown;Declaration
View full TypeScript declaration
export interface RecordingContext2D { readonly calls: Record<string, number>; fillStyle: string; strokeStyle: string; font: string; textAlign: string; textBaseline: string; lineWidth: number; [method: string]: unknown;}