revolut-mcp uses Jest (via ts-jest) for testing. There are two layers:
Run these from the repository root (a source checkout — see Installation › From source).
npm test
This runs the full unit-test suite (tests/**/*.test.ts). The Revolut API client is mocked, so no Client ID, private key, or token store is needed. This is the suite that runs in CI on every push and pull request.
npm run test:coverage
Same suite, with a coverage report. Results are written to the coverage/ directory (open coverage/lcov-report/index.html in a browser for the HTML view).
The live test in tests/integration/live.test.ts exercises the real sandbox API — for example, listing accounts and fetching an exchange rate with its fee. It is skipped by default and only runs when REVOLUT_RUN_INTEGRATION=1 is set.
npm run test:integration
The test:integration script sets REVOLUT_RUN_INTEGRATION=1 for you. Equivalently, you can run the live test file directly:
REVOLUT_RUN_INTEGRATION=1 npm test -- live
Because it calls the live sandbox, the live test needs the same configuration the server uses, and it reads tokens from your token store:
TOKEN_STORE_PATH. Complete authentication first (run the server, call setup_auth, then complete_auth) so a .tokens.json exists. See the Authentication guide.REVOLUT_RUN_INTEGRATION=1 \
REVOLUT_CLIENT_ID=your_client_id \
REVOLUT_PRIVATE_KEY_PATH=./certs/privatekey.pem \
REVOLUT_REDIRECT_URI=https://example.com/ \
REVOLUT_JWT_ISS=example.com \
TOKEN_STORE_PATH=./.tokens.json \
REVOLUT_ENVIRONMENT=sandbox \
npm run test:integration
On Windows PowerShell, set the variables with
$env:NAME = "value"on separate lines before runningnpm run test:integration, rather than the inlineNAME=valueprefix shown above (which is bash syntax).
If
REVOLUT_RUN_INTEGRATIONis unset, the live suite is silently skipped — so a normalnpm testnever touches the network or requires credentials.