Skip to content

Commit 7afdbd2

Browse files
committed
Increase timeout in the cloudflare-worker
1 parent 3c62031 commit 7afdbd2

File tree

5 files changed

+18
-9
lines changed

5 files changed

+18
-9
lines changed

integration/cloudflare-worker/.npmrc

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
package-lock=false
2-
2+
audit=false
3+
fund=false

integration/cloudflare-worker/index.test.js

+10-5
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import { unstable_dev as dev } from "wrangler";
33
import { test, after, before, describe } from "node:test";
44
import assert from "node:assert";
55

6-
/** @type {import("wrangler").UnstableDevWorker} */
76
describe("CloudFlare Worker", () => {
7+
/** @type {import("wrangler").UnstableDevWorker} */
88
let worker;
99

1010
before(async () => {
@@ -22,15 +22,20 @@ describe("CloudFlare Worker", () => {
2222
await worker.stop();
2323
});
2424

25-
test("worker streams back a response", { timeout: 1000 }, async () => {
25+
test("worker streams back a response", { timeout: 5000 }, async () => {
2626
const resp = await worker.fetch();
2727
const text = await resp.text();
2828

29-
assert.ok(resp.ok, "status is 2xx");
30-
assert(text.length > 0, "body.length is greater than 0");
29+
assert.ok(resp.ok, `expected status to be 2xx but got ${resp.status}`);
30+
assert(
31+
text.length > 0,
32+
"expected body to have content but got body.length of 0"
33+
);
3134
assert(
3235
text.includes("Colin CloudFlare"),
33-
"body includes stream characters"
36+
`expected body to include "Colin CloudFlare" but got ${JSON.stringify(
37+
text
38+
)}`
3439
);
3540
});
3641
});

integration/commonjs/.npmrc

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
package-lock=false
2-
2+
audit=false
3+
fund=false

integration/esm/.npmrc

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
package-lock=false
2-
2+
audit=false
3+
fund=false

integration/typescript/.npmrc

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
package-lock=false
2-
2+
audit=false
3+
fund=false

0 commit comments

Comments
 (0)