Skip to content

Commit b0ec523

Browse files
committed
run setup-deps before running tests
1 parent 98b7bec commit b0ec523

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ jobs:
9292
- name: Run Deno tests
9393
run: |
9494
cd test/deno
95-
npm run setup-deps
9695
npm test || npm test
9796
9897
- name: Stop Supabase

test/deno/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "test-deno",
33
"private": true,
44
"scripts": {
5-
"test": "deno test --allow-all --unstable-sloppy-imports integration.test.ts",
5+
"test": "npm run setup-deps && deno test --allow-all --unstable-sloppy-imports integration.test.ts",
66
"setup-deps": "node setup-deps.js"
77
},
88
"dependencies": {

test/integration.browser.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,10 @@ const content = `<html>
2727
const [realtimeStatus, setRealtimeStatus] = React.useState(null)
2828
const channel = supabase.channel('realtime:public:todos')
2929
React.useEffect(() => {
30-
if (channel.state === 'closed') {
31-
channel.subscribe((status) => { if (status === 'SUBSCRIBED') setRealtimeStatus(status) })
30+
channel.subscribe((status) => { if (status === 'SUBSCRIBED') setRealtimeStatus(status) })
31+
32+
return () => {
33+
channel.unsubscribe()
3234
}
3335
}, [])
3436
if (realtimeStatus) {

0 commit comments

Comments
 (0)