Merge registry-envelope-integration into main (resolve conflicts with call-envelope-integration)
This commit is contained in:
@@ -31,6 +31,7 @@ describe("PendingRequestMap", () => {
|
||||
}, 10);
|
||||
|
||||
const result = await callPromise;
|
||||
expect(isResponseEnvelope(result)).toBe(true);
|
||||
expect(result.meta.source).toBe("local");
|
||||
expect(result.data).toEqual({ result: "world" });
|
||||
});
|
||||
@@ -59,6 +60,11 @@ describe("PendingRequestMap", () => {
|
||||
}
|
||||
});
|
||||
|
||||
it("respond() throws when called with non-envelope value", () => {
|
||||
const map = new PendingRequestMap();
|
||||
expect(() => map.respond("req-1", { result: "world" } as any)).toThrow("ResponseEnvelope");
|
||||
});
|
||||
|
||||
it("call() rejects when emitError() is called", async () => {
|
||||
const map = new PendingRequestMap();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user