AI Implementation feature(820): Project Scaffold and Platform Foundations (#1)
This commit was merged in pull request #1.
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import { envSchema, SYSTEM_CATEGORY_KEYS, SETTINGS_KEYS } from '../../backend/src/config/env.schema';
|
||||
|
||||
describe('envSchema', () => {
|
||||
it('accepts minimal valid env', () => {
|
||||
const r = envSchema.safeParse({});
|
||||
expect(r.success).toBe(true);
|
||||
});
|
||||
|
||||
it('rejects invalid PORT', () => {
|
||||
const r = envSchema.safeParse({ PORT: 'not-a-number' });
|
||||
expect(r.success).toBe(false);
|
||||
});
|
||||
|
||||
it('rejects short JWT secrets', () => {
|
||||
const r = envSchema.safeParse({ JWT_ACCESS_SECRET: 'short' });
|
||||
expect(r.success).toBe(false);
|
||||
});
|
||||
|
||||
it('exposes the canonical system category and settings keys', () => {
|
||||
expect(SYSTEM_CATEGORY_KEYS).toEqual(['crypto', 'forensics', 'pwn', 'web', 'misc', 'osint']);
|
||||
expect(SETTINGS_KEYS.THEME_KEY).toBe('themeKey');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user