Skip to content

Commit 205eed6

Browse files
committed
Udated testing.md
Added Superbase emulator workaround
1 parent b50f266 commit 205eed6

1 file changed

Lines changed: 21 additions & 1 deletion

File tree

docs/testing.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,6 @@ jest.mock('path/to/module')
348348
* This creates an object containing all named exports from ./path/to/module
349349
*/
350350
import * as mockModule from 'path/to/module'
351-
352351
;(mockModule.module as jest.Mock).mockResolvedValue(mockReturnValue)
353352
```
354353

@@ -984,6 +983,27 @@ For comprehensive troubleshooting guidance beyond testing-specific issues, see
984983
the [Troubleshooting Guide](troubleshooting.md) which covers development environment setup, database and emulator
985984
issues, API problems, and more.
986985

986+
### Supabase emulator not working
987+
988+
There might be compatability issues with the Supabase emulator and your setup this can cause a `Runtime error` on the app pointing to an issue in the `supabase/utils.ts (69: 17)` file, and the Supabase emulator showing a generic `site can't be reached` browser error.
989+
990+
The workaround for this is to use a remote db and the local firebase emulator
991+
992+
Install DBeaver (contact the main maintainer for the postgres db connection info) to view and edit the database
993+
994+
```bash
995+
# Comment out "Object.assign(process.env, supabaseEnv)" in playwright.config.ts
996+
997+
# This launches the Firebase Emulator
998+
yarn emulate
999+
1000+
# This launches the app
1001+
yarn dev
1002+
1003+
# Launch Playwright
1004+
npx playwright test --ui
1005+
```
1006+
9871007
### Port already in use
9881008

9891009
```bash

0 commit comments

Comments
 (0)