Testing¶
No tests exist.
package.jsonhas notestscript (noscripts.test).- No test framework (Jest, Vitest, Mocha) in
dependenciesordevDependencies. - No
__tests__/,test/,spec/,e2e/directories.
What the mock/ directory is (and isn't)¶
The mock/ directory is sometimes mistaken for test fixtures. It is not — those files are part of the runtime branch (isLocal === true mode in routes/index.js). They are loaded by require() from the running server, not by a test runner.
There is no harness that hits the standalone server's endpoints and asserts on the response.
Manual verification¶
What is currently practical:
NODE_ENV=development node server.js(in this repo).curl http://localhost:6001/dashboard/getAccountInsights/2026-01-01/2026-01-31/[1,3,4]— returns mock data.- Eyeball the response.
What a minimal test suite would look like¶
For a 10-endpoint service, the bar is low. A first pass:
- Smoke: per endpoint, an integration test that boots the server in mock mode and asserts a 200 response with the expected shape.
- Shape: assert that mock responses match the production response shape (currently nothing enforces this — the mocks can silently drift).
- Param validation: send malformed
:pId(e.g.,"foo"instead of a JSON array) and assert the handler doesn't crash.
A supertest + vitest setup with ~50 lines of package.json additions would give all the above. Not a current ask, but worth noting as a low-effort improvement.
Coverage in the broader platform¶
The platform as a whole has no test suite — someli-api, someli-platform, designer-api, Someli-Designer, Someli-admin-api all have "test": "echo \"Error: no test specified\" && exit 1" placeholders. admin_console_R has ESLint configured but no unit tests. This repo follows the same posture.