mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 06:39:48 +00:00
20b4556c85
* include debug instructions * remove pkg as a dependency * fix doc * add tslib to send-request to fix libcurl pkg bs * bump pkg to 5.8.1 * remove not needed scripts
1.8 KiB
1.8 KiB
CLI
Run CLI Smoke Tests
# Package the Inso CLI binaries
npm run inso-package
# Run CLI tests
npm run test:smoke:cli
Debugging CLI tests using watcher
This is helpful for debugging failing api tests and changing the send-request abstraction
From project root, in separate terminals:
# start smoke test api
npm run serve --prefix packages/insomnia-smoke-test
# build send-request
npm run build:sr --prefix packages/insomnia
# watch inso
npm run start --prefix packages/insomnia-inso
# run api test with dev bundle
$PWD/packages/insomnia-inso/bin/inso run test "Echo Test Suite" --src $PWD/packages/insomnia-smoke-test/fixtures/inso-nedb --env Dev --verbose
How to debug pkg
# run modify package command and then a unit test
npm run package --prefix packages/insomnia-inso && \
$PWD/packages/insomnia-inso/binaries/inso run test "Echo Test Suite" --src $PWD/packages/insomnia-smoke-test/fixtures/inso-nedb --env Dev --verbose
How to update the inso-nedb
fixtures
Run Insomnia with INSOMNIA_DATA_PATH
environment variable set to fixtures/inso-nedb
, e.g.:
INSOMNIA_DATA_PATH=packages/insomnia-smoke-test/fixtures/inso-nedb /Applications/Insomnia.app/Contents/MacOS/Insomnia
Relaunch the app one more time, so that Insomnia compacts the database.
The .gitignore
file will explicitly ignore certain database files, to keep the directory size down and avoid prevent sensitive data leaks.
How to run inso with the inso-nedb
fixture locally?
Set the --src
argument pointed to packages/insomnia-smoke-test/fixtures/inso-nedb
:
# if installed globally
inso --src <INSO_NEDB_PATH>
# using the package bin
./packages/insomnia-inso/bin/inso --src <INSO_NEDB_PATH>
# using a binary
./packages/insomnia-inso/binaries/insomnia-inso --src <INSO_NEDB_PATH>