Files
coffeechat/server/test/config.test.js
T
2026-09-21 03:38:09 +08:00

8 lines
389 B
JavaScript

import test from 'node:test';
import assert from 'node:assert/strict';
import { loadConfig } from '../src/config.js';
test('production rejects missing secrets', () => assert.throws(() => loadConfig({ NODE_ENV: 'production' }), /Missing environment variables/));
test('development permits local defaults', () => assert.equal(loadConfig({ NODE_ENV: 'development' }).allowDevLogin, true));