@@ -40,6 +40,7 @@ public function testExtract()
4040 $ translationsByDomain = $ this ->scanner ->extract ([
4141 new ScanItem ($ this ->getDummyFile ('js/dummy.js ' )), // 1 JS message
4242 new ScanItem ($ this ->getDummyFile ('js/dummy.vue ' )), // 2 JS messages
43+ new ScanItem ($ this ->getDummyFile ('js/dummy-ts.ts ' )),
4344 new ScanItem ($ this ->getDummyFile ('dummy-file.php ' )), // PHP messages, should be ignored
4445 ]);
4546
@@ -55,9 +56,10 @@ public function testExtract()
5556
5657 $ translations = $ this ->storage ->getEnabledTranslatedJs ('en_US ' , 'domain ' );
5758
58- self ::assertCount (3 , $ translations , '3 translations extracted ' );
59- self ::assertNotFalse ($ translations ->find ('ctx ' , 'JS 1 ' ), 'Translation found ' );
60- self ::assertNotFalse ($ translations ->find ('' , 'JS 2 ' ), 'Translation found ' );
61- self ::assertNotFalse ($ translations ->find ('' , 'JS 3 ' ), 'Translation found ' );
59+ self ::assertCount (4 , $ translations , 'The number of translations extracted does not match ' );
60+ self ::assertNotFalse ($ translations ->find ('ctx ' , 'JS 1 ' ), 'Translation not found ' );
61+ self ::assertNotFalse ($ translations ->find ('' , 'JS 2 ' ), 'Translation not found ' );
62+ self ::assertNotFalse ($ translations ->find ('' , 'JS 3 ' ), 'Translation not found ' );
63+ self ::assertNotFalse ($ translations ->find ('' , 'JS TS ' ), 'Translation not found ' );
6264 }
6365}
0 commit comments