File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 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" : {
Original file line number Diff line number Diff 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) {
You can’t perform that action at this time.
0 commit comments