npm install will download the electron version of libcurl but for inso we need the node version
node_modules/.bin/node-pre-gyp install --update-binary --directory node_modules/@getinsomnia/node-libcurlto download the electron version of node-libcurl you should remove the module and npm install again
rm -rf node_modules/@getinsomnia/
npm install# Package the Inso CLI binaries
npm run inso-package
# Run CLI tests
npm run test:smoke:cliThis 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 -w packages/insomnia-smoke-test
# build send-request
npm run build:sr -w packages/insomnia
# watch inso
npm run start -w 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# run modify package command and then a unit test
npm run package -w 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
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/InsomniaRelaunch 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.
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>