Skip to content

Testing with Qelos ​

@qelos/testing is the testing suite for apps that use the Qelos SDK or a Qelos integrator. Its core is a stateful, in-memory mimic of the Qelos HTTP API (sign up / sign in, sessions, workspaces, blueprint entities, ...), so your app, your tests and your CI can run without a Qelos tenant, a network or an account.

bash
npm i -D @qelos/testing

What you can do with it ​

GoalUseGuide
Unit-test code that uses the SDKcreateMockSdk() from @qelos/testing/sdkUnit testing
Test your HTTP app (Express, Fastify, Nest, ...) end to endtestApp() from @qelos/testing/httpTesting an app
Build seed data with factoriespersona(), admin(), blueprint(), entities() from @qelos/testing/fixturesFixtures
Test retries, error handling and expirymock.faults (latency, 5xx, dropped connections, rate limits, expired sessions)Fault injection
Script AI agent replies and tool callsmock.aiScripted AI agents
Test checkout, subscriptions and invoicessdk.payments on the mock, mock.paymentsPayments
Replay recorded tenant responses for endpoints the mock lackscreateRecorder() and createMockQelos({ cassette })Record and replay
Develop locally with no tenantMock mode in your integrator, or qelos mock serveDevelop locally without a tenant
Seed realistic dataImport qelos dump / qelos pull folders into mock stateqelos mock
Run integration / e2e tests against a real HTTP servercreateMockQelos() + the qelos-testing binPackage README
Test your integrator setupEnable mock mode in Express, Next.js, Nuxt, Fastify, NestJS or FastAPIIntegrators

Safety ​

Mock mode refuses to run in production (NODE_ENV=production, non-debug FastAPI runs, ...) unless you opt in explicitly. Install @qelos/testing as a dev dependency only.

Build SaaS Products Without Limits.