test: add jest/supertest infrastructure and make server.js testable

Made-with: Cursor
This commit is contained in:
cottongin
2026-03-15 18:40:44 -04:00
parent 81fcae545e
commit 84b0c83409
6 changed files with 6653 additions and 16 deletions

4
tests/jest.setup.js Normal file
View File

@@ -0,0 +1,4 @@
process.env.DB_PATH = ':memory:';
process.env.JWT_SECRET = 'test-jwt-secret-do-not-use-in-prod';
process.env.ADMIN_KEY = 'test-admin-key';
process.env.PORT = '0';