fix: address release v2 review findings (#6708)
This commit is contained in:
1 parent
a002b91add
commit
7da2e10064
39 files changed
+500
-769
No files matched your search
@@ -12,6 +12,11 @@ describe("getUsableWidgetQueryData", () => {
|
||||
expect(getUsableWidgetQueryData({ data, error: new Error("offline") })).toBe(data);
|
||||
});
|
||||
|
||||
test("throws access-denied refetches instead of rendering stale cached data", () => {
|
||||
const error = { data: { code: "FORBIDDEN" } };
|
||||
expect(() => getUsableWidgetQueryData({ data: [{ id: "revoked" }], error })).toThrow(error);
|
||||
});
|
||||
|
||||
test("throws a terminal failure when no usable data exists", () => {
|
||||
const error = new Error("offline");
|
||||
expect(() => getUsableWidgetQueryData({ data: undefined, error })).toThrow(error);
|
||||
|
||||
Reference in new issue
Block a user