mirror of
https://github.com/tiennm99/tiennm99bot.git
synced 2026-10-20 00:15:50 +00:00
feat: initialize wheelofnames API
This commit is contained in:
1 parent
194caf17eb
commit
3f5ed700bb
41 files changed
+5031
No files matched your search
@@ -0,0 +1,21 @@
|
||||
import {describe, expect, test} from 'vitest';
|
||||
import {loadConfig, minRenderTimeoutMs} from '../src/config.js';
|
||||
|
||||
describe('loadConfig', () => {
|
||||
test('keeps render timeout compatible with Remotion browser timeout limits', () => {
|
||||
const config = loadConfig({RENDER_TIMEOUT_MS: '500'});
|
||||
|
||||
expect(config.renderTimeoutMs).toBe(minRenderTimeoutMs);
|
||||
});
|
||||
|
||||
test('requires API_TOKEN in production', () => {
|
||||
expect(() => loadConfig({NODE_ENV: 'production'})).toThrow(/API_TOKEN/);
|
||||
});
|
||||
|
||||
test('accepts API_TOKEN in production', () => {
|
||||
const config = loadConfig({NODE_ENV: 'production', API_TOKEN: 'secret'});
|
||||
|
||||
expect(config.requiresApiToken).toBe(true);
|
||||
expect(config.apiToken).toBe('secret');
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user