Tests for the Electron app are written using [Playwright](https://github.com/microsoft/playwright) while tests for the CLI use [execa](https://github.com/sindresorhus/execa).
You can also use the [playwright extension](https://marketplace.visualstudio.com/items?itemName=ms-playwright.playwright) to run and debug tests directly from VS Code.
With the extension installed, in a terminal, run the watcher
```shell
npm run watch:app
```
You can now run and debug playwright tests, either from the `Testing` tab, or by going into one of the test files and clicking the run button.
If no tests appear, you may need to run "Refresh playwright tests". This can be done from the command palette, or by using the button at the top of the `Testing` tab.
A test should not depend on any external services unless absolutely necessary. If a particular endpoint is required (eg. for authentication or a specific content type), implement a new endpoint in `/server`.
In order to update the inso-nedb fixutre you need to launch Insomnia using the inso-nedb directory. To do this, set the INSOMNIA_DATA_PATH environment variable and launch from the command line.
After making your changes, be sure to relaunch the app one more time from the command line, so that Insomnia compacts the database. The .gitignore file will explicity ignore certain database files, to keep the directory size down and avoid prevent data leakage in case you are signed in to the app when launching with this database.
### How to run inso with the inso-nedb fixture locally?
Set the `--src packages/insomnia-smoke-test/fixtures/inso-nedb` flag