@@ -2,8 +2,8 @@ import { describe, it, expect } from 'vitest';
22import { getLanguageFromPath } from './getLanguageFromPath' ;
33
44describe ( 'getLanguageFromPath' , ( ) => {
5- it ( 'should return typescript for .tsx files' , ( ) => {
6- expect ( getLanguageFromPath ( 'ReactRenders3.tsx' ) ) . toBe ( 'typescript ' ) ;
5+ it ( 'should return tsx for .tsx files' , ( ) => {
6+ expect ( getLanguageFromPath ( 'ReactRenders3.tsx' ) ) . toBe ( 'tsx ' ) ;
77 } ) ;
88
99 it ( 'should return typescript for .ts files' , ( ) => {
@@ -14,8 +14,8 @@ describe('getLanguageFromPath', () => {
1414 expect ( getLanguageFromPath ( 'script.js' ) ) . toBe ( 'javascript' ) ;
1515 } ) ;
1616
17- it ( 'should return javascript for .jsx files' , ( ) => {
18- expect ( getLanguageFromPath ( 'component.jsx' ) ) . toBe ( 'javascript ' ) ;
17+ it ( 'should return jsx for .jsx files' , ( ) => {
18+ expect ( getLanguageFromPath ( 'component.jsx' ) ) . toBe ( 'jsx ' ) ;
1919 } ) ;
2020
2121 it ( 'should return python for .py files' , ( ) => {
@@ -59,11 +59,11 @@ describe('getLanguageFromPath', () => {
5959 } ) ;
6060
6161 it ( 'should handle paths with multiple dots' , ( ) => {
62- expect ( getLanguageFromPath ( 'src/components/MyComponent.tsx' ) ) . toBe ( 'typescript ' ) ;
62+ expect ( getLanguageFromPath ( 'src/components/MyComponent.tsx' ) ) . toBe ( 'tsx ' ) ;
6363 } ) ;
6464
6565 it ( 'should handle case insensitive extensions' , ( ) => {
66- expect ( getLanguageFromPath ( 'Component.TSX' ) ) . toBe ( 'typescript ' ) ;
66+ expect ( getLanguageFromPath ( 'Component.TSX' ) ) . toBe ( 'tsx ' ) ;
6767 expect ( getLanguageFromPath ( 'Script.JS' ) ) . toBe ( 'javascript' ) ;
6868 } ) ;
6969} ) ;
0 commit comments