Skip to content

Commit f3e4cfc

Browse files
authored
chore: update e2e tests and README (#1497)
1 parent 9dc7a3b commit f3e4cfc

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

test/e2e/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,4 +104,4 @@ INSERT INTO "auth"."users" ("instance_id", "id", "aud", "role", "email", "encryp
104104
## Run tests
105105

106106
Run the following command
107-
`deno test tests.ts --allow-read --allow-net --trace-leaks`
107+
`deno test tests.ts --allow-read --allow-net --trace-leaks --allow-env=WS_NO_BUFFER_UTIL`

test/e2e/tests.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const url = env["PROJECT_URL"];
1919
const token = env["PROJECT_ANON_TOKEN"];
2020
const jwtSecret = env["PROJECT_JWT_SECRET"];
2121

22-
const realtime = { heartbeatIntervalMs: 500, timeout: 1000 };
22+
const realtime = { heartbeatIntervalMs: 5000, timeout: 5000 };
2323
const config = { config: { broadcast: { self: true } } };
2424

2525
let supabase: SupabaseClient | null;
@@ -102,7 +102,7 @@ describe("presence extension", () => {
102102

103103
while (channel.state == "joining") await sleep(0.2);
104104

105-
const res = await channel.track(expectedPayload, { timeout: 1000 });
105+
const res = await channel.track(expectedPayload, { timeout: 5000 });
106106
if (res == "timed out") error = res;
107107

108108
let presences = result[0].newPresences[0];
@@ -135,7 +135,7 @@ describe("presence extension", () => {
135135

136136
while (channel.state == "joining") await sleep(0.2);
137137

138-
const res = await channel.track(expectedPayload, { timeout: 1000 });
138+
const res = await channel.track(expectedPayload, { timeout: 5000 });
139139
if (res == "timed out") error = res;
140140

141141
let presences = result[0].newPresences[0];
@@ -162,7 +162,7 @@ describe("authorization check", () => {
162162

163163
assertEquals(
164164
errMessage,
165-
`"You do not have permissions to read from this Channel topic: ${topic}"`
165+
`"Unauthorized: You do not have permissions to read from this Channel topic: ${topic}"`
166166
);
167167
});
168168

0 commit comments

Comments
 (0)