fix: correct type assertion in stateMapper test
Security Scan and Upload / Security & DefectDojo Upload (pull_request) Successful in 1m11s
CI / Lint & Test (pull_request) Successful in 16m8s
CI / Build Linux (pull_request) Successful in 20m20s
CI / Build Windows (cross-compile) (pull_request) Successful in 30m38s

The test for unknown result subtype was using an invalid subtype value
directly, which caused a TypeScript error. Changed to use a type
assertion to properly test the unknown subtype case, matching the
pattern used for testing unknown message types.

This fix ensures all TypeScript checks pass whilst still testing the
edge case behaviour for unexpected subtype values.
This commit is contained in:
2026-02-07 00:19:55 -08:00
committed by Naomi Carrigan
parent d665dfa0cf
commit d8c1c3dee1
+2 -2
View File
@@ -267,10 +267,10 @@ describe("stateMapper", () => {
});
it("returns null for result with unknown subtype", () => {
const message: ClaudeStreamMessage = {
const message = {
type: "result",
subtype: "unknown_type",
};
} as unknown as ClaudeStreamMessage;
expect(mapMessageToState(message)).toBeNull();
});