Because:
- The profile-server suite ran on both Mocha and Jest during migration,
and the Jest integration suite was never executed in CI, hiding a
broken test port and leaving the package's TypeScript specs unlinted.
This commit:
- Ports the final Mocha suite (error.js) to Jest as error.spec.ts and
deletes the seven duplicate Mocha suites now covered by Jest.
- Rewires test-unit and test-integration to run Jest only, with
jest-junit output, --coverage reporting, and --runInBand for the
integration suites that share a database.
- Adds Jest coverage config to jest.config.ts.
- Removes the mocha, mocha-text-cov, nyc, and insist devDependencies,
adds jest-junit, and deletes the dead mocha-coverage.js and
test-local.sh scripts.
- Fixes a mis-ported api integration test that wrongly expected a 500
remap instead of 4xx propagation, which cascaded into 47 failures.
- Hardens the mock helper's done() with try/finally so one failed
assertion can no longer cascade into later tests.
- Adds an ESLint *.ts override (TypeScript parser + jest env) so the
specs are actually linted, and cleans up the let/const violations
that surfaced.
- Switches the assertSecurityHeaders helper from insist to node assert.