mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 16:57:46 +00:00
Special case mime type for ts file. (#2902)
This commit is contained in:
committed by
GitHub
parent
383306e17e
commit
82afc75350
@@ -196,6 +196,11 @@ describe('fileUtils', () => {
|
||||
vi.restoreAllMocks(); // Restore spies on actualNodeFs
|
||||
});
|
||||
|
||||
it('should detect typescript type by extension (ts)', () => {
|
||||
expect(detectFileType('file.ts')).toBe('text');
|
||||
expect(detectFileType('file.test.ts')).toBe('text');
|
||||
});
|
||||
|
||||
it('should detect image type by extension (png)', () => {
|
||||
mockMimeLookup.mockReturnValueOnce('image/png');
|
||||
expect(detectFileType('file.png')).toBe('image');
|
||||
|
||||
Reference in New Issue
Block a user