generated from nhcarrigan/template
fix: correct type assertion in stateMapper test
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:
@@ -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();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user