mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-13 21:40:42 +00:00
test: tighten web push subscription assertion
This commit is contained in:
@@ -37,10 +37,10 @@ vi.mock("web-push", () => ({
|
||||
function expectLoadedSubscription(
|
||||
loaded: Awaited<ReturnType<typeof loadWebPushSubscription>>,
|
||||
): WebPushSubscription {
|
||||
expect(loaded).toEqual(expect.objectContaining({ endpoint: expect.any(String) }));
|
||||
if (loaded === null) {
|
||||
throw new Error("Expected loaded web push subscription");
|
||||
}
|
||||
expect(loaded.endpoint).not.toBe("");
|
||||
return loaded;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user