more tests

This commit is contained in:
Ticruz
2025-02-04 13:21:23 +01:00
committed by Jon Staab
parent 8c638a7d8f
commit 23f7244039
14 changed files with 83 additions and 80 deletions
+3 -2
View File
@@ -18,7 +18,7 @@ import {
// Mock dependencies
vi.mock("@welshman/net", () => ({
publish: vi.fn(),
publish: vi.fn().mockReturnValue({emitter: {on: vi.fn()}}),
PublishStatus: {
Pending: "pending",
Success: "success",
@@ -269,8 +269,9 @@ describe("thunkWorker", async () => {
it("should handle publish failures", async () => {
const mockSigner = {
sign: vi.fn().mockRejectedValue(new Error("Signing failed")),
sign: vi.fn().mockRejectedValue("Signing failed"),
}
vi.mocked(sessionModule.getSigner).mockReturnValue(mockSigner)
const thunk = makeThunk(mockRequest)