Skip to content

Commit 5b83e20

Browse files
committed
json-rpc: delete pending() call in test
1 parent 6c8a248 commit 5b83e20

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

packages/json-rpc/src/jsonrpcclient.spec.ts

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,6 @@ import { JsonRpcClient, SimpleMessagingConnection } from "./jsonrpcclient";
66
import { parseJsonRpcResponse } from "./parse";
77
import { JsonRpcRequest, JsonRpcResponse } from "./types";
88

9-
function pendingWithoutWorker(): void {
10-
if (typeof Worker === "undefined") {
11-
pending("Environment without WebWorker support detected. Marked as pending.");
12-
}
13-
}
14-
159
function makeSimpleMessagingConnection(
1610
worker: Worker,
1711
): SimpleMessagingConnection<JsonRpcRequest, JsonRpcResponse> {
@@ -34,21 +28,17 @@ function makeSimpleMessagingConnection(
3428
};
3529
}
3630

37-
describe("JsonRpcClient", () => {
31+
(typeof Worker !== "undefined" ? describe : xdescribe)("JsonRpcClient", () => {
3832
const dummyserviceKarmaUrl = "/base/dist/web/dummyservice.worker.js";
3933

4034
it("can be constructed with a Worker", () => {
41-
pendingWithoutWorker();
42-
4335
const worker = new Worker(dummyserviceKarmaUrl);
4436
const client = new JsonRpcClient(makeSimpleMessagingConnection(worker));
4537
expect(client).toBeTruthy();
4638
worker.terminate();
4739
});
4840

4941
it("can communicate with worker", async () => {
50-
pendingWithoutWorker();
51-
5242
const worker = new Worker(dummyserviceKarmaUrl);
5343

5444
const client = new JsonRpcClient(makeSimpleMessagingConnection(worker));
@@ -66,8 +56,6 @@ describe("JsonRpcClient", () => {
6656
});
6757

6858
it("supports params as dictionary", async () => {
69-
pendingWithoutWorker();
70-
7159
const worker = new Worker(dummyserviceKarmaUrl);
7260

7361
const client = new JsonRpcClient(makeSimpleMessagingConnection(worker));

0 commit comments

Comments
 (0)