mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-21 09:17:53 +00:00
fix(core): Treat .mts files as TypeScript modules instead of video files (#5492)
Co-authored-by: Jacob Richman <jacob314@gmail.com>
This commit is contained in:
@@ -196,9 +196,13 @@ describe('fileUtils', () => {
|
||||
vi.restoreAllMocks(); // Restore spies on actualNodeFs
|
||||
});
|
||||
|
||||
it('should detect typescript type by extension (ts)', async () => {
|
||||
it('should detect typescript type by extension (ts, mts, cts, tsx)', async () => {
|
||||
expect(await detectFileType('file.ts')).toBe('text');
|
||||
expect(await detectFileType('file.test.ts')).toBe('text');
|
||||
expect(await detectFileType('file.mts')).toBe('text');
|
||||
expect(await detectFileType('vite.config.mts')).toBe('text');
|
||||
expect(await detectFileType('file.cts')).toBe('text');
|
||||
expect(await detectFileType('component.tsx')).toBe('text');
|
||||
});
|
||||
|
||||
it('should detect image type by extension (png)', async () => {
|
||||
|
||||
Reference in New Issue
Block a user