@@ -18,6 +18,7 @@ describe(highlightCode.name, () => {
1818 [ 'foo.feature' , ProgrammingLanguage . gherkin , 'Feature: foo' ] ,
1919 [ 'foo.scala' , ProgrammingLanguage . scala , 'object Foo { def main(args: Array[String]) = println("Hello, world!") }' ] ,
2020 [ 'foo.rs' , ProgrammingLanguage . rust , 'fn main() { println!("Hello, world!"); }' ] ,
21+ [ 'foo.py' , ProgrammingLanguage . python , 'a = 10' ] ,
2122 ] ) ( `should parse %s as %s` , ( fileName , language , code ) => {
2223 const highlightedCode = highlightCode ( code , fileName ) ;
2324 expect ( highlightedCode ) . contains ( '<span' ) ; // actual highlighting is not tested, in prism we trust
@@ -197,6 +198,7 @@ describe(determineLanguage.name, () => {
197198 [ 'php' , ProgrammingLanguage . php ] ,
198199 [ 'vue' , ProgrammingLanguage . vue ] ,
199200 [ 'feature' , ProgrammingLanguage . gherkin ] ,
201+ [ 'py' , ProgrammingLanguage . python ] ,
200202 ] as const ) ( `should recognize file.%s as language %s` , ( extension , expected ) => {
201203 expect ( determineLanguage ( `file.${ extension } ` ) ) . eq ( expected ) ;
202204 } ) ;
0 commit comments