Return null for unknown type in getStateData to prevent empty URL request
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -77,6 +77,13 @@ describe("compareStore", () => {
|
||||
expect(mockGet).toHaveBeenCalledWith("/api/filters/3/discover");
|
||||
expect(result).toEqual({ cases: 50 });
|
||||
});
|
||||
|
||||
it("returns null for unknown type", async () => {
|
||||
const result = await store.getStateData("unknown", 1);
|
||||
|
||||
expect(mockGet).not.toHaveBeenCalled();
|
||||
expect(result).toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
describe("getFileName", () => {
|
||||
|
||||
Reference in New Issue
Block a user