feat: enhance file upload handling with improved file detection, size limits, and response formatting

This commit is contained in:
MythEclipse
2026-05-21 22:31:55 +07:00
parent 06844f1fa1
commit 52340ee77d
20 changed files with 696 additions and 539 deletions
+2 -3
View File
@@ -1,4 +1,3 @@
// @ts-nocheck
import { describe, expect, it } from 'bun:test';
import { config } from '../src/env';
@@ -16,12 +15,12 @@ describe('Environment Variables Validation', () => {
});
it('config.botToken should return BOT_TOKEN from process.env', () => {
expect(config.botToken).toBe(process.env.BOT_TOKEN);
expect(config.botToken).toBe(process.env.BOT_TOKEN || '');
});
it('config.storageChatId should be parsed as integer from STORAGE_CHANNEL_ID', () => {
expect(typeof config.storageChatId).toBe('number');
expect(config.storageChatId).toBe(parseInt(process.env.STORAGE_CHANNEL_ID, 10));
expect(config.storageChatId).toBe(parseInt(process.env.STORAGE_CHANNEL_ID || '0', 10));
});
it('config.port should default to 3000 when not specified', () => {