@@ -208,6 +208,40 @@ public function testJsCode()
208208 $ this ->runTestFormat ('jscode/YamlDictionary ' , $ countTranslations );
209209 }
210210
211+ public function testJs2Code ()
212+ {
213+ $ translations = static ::get ('jscode2/input ' , 'JsCode ' );
214+ $ countTranslations = 3 ;
215+ $ countHeaders = 8 ;
216+
217+ $ this ->assertCount ($ countTranslations , $ translations );
218+ $ this ->assertCount ($ countHeaders , $ translations ->getHeaders ());
219+
220+ $ this ->assertContent ($ translations , 'jscode2/Po ' );
221+ $ this ->assertContent ($ translations , 'jscode2/Mo ' );
222+ $ this ->assertContent ($ translations , 'jscode2/PhpArray ' );
223+ $ this ->assertContent ($ translations , 'jscode2/Jed ' );
224+ $ this ->assertContent ($ translations , 'jscode2/Json ' );
225+ $ this ->assertContent ($ translations , 'jscode2/JsonDictionary ' );
226+ $ this ->assertContent ($ translations , 'jscode2/Csv ' );
227+ $ this ->assertContent ($ translations , 'jscode2/CsvDictionary ' );
228+ $ this ->assertContent ($ translations , 'jscode2/Xliff ' );
229+ $ this ->assertContent ($ translations , 'jscode2/Yaml ' );
230+ $ this ->assertContent ($ translations , 'jscode2/YamlDictionary ' );
231+
232+ $ this ->runTestFormat ('jscode2/Po ' , $ countTranslations , $ countHeaders );
233+ $ this ->runTestFormat ('jscode2/Mo ' , 0 , $ countHeaders );
234+ $ this ->runTestFormat ('jscode2/PhpArray ' , $ countTranslations , $ countHeaders );
235+ $ this ->runTestFormat ('jscode2/Jed ' , $ countTranslations , 10 );
236+ $ this ->runTestFormat ('jscode2/Xliff ' , $ countTranslations , $ countHeaders );
237+ $ this ->runTestFormat ('jscode2/Json ' , $ countTranslations , $ countHeaders );
238+ $ this ->runTestFormat ('jscode2/JsonDictionary ' , $ countTranslations );
239+ $ this ->runTestFormat ('jscode2/Csv ' , $ countTranslations , $ countHeaders );
240+ $ this ->runTestFormat ('jscode2/CsvDictionary ' , $ countTranslations );
241+ $ this ->runTestFormat ('jscode2/Yaml ' , $ countTranslations , $ countHeaders );
242+ $ this ->runTestFormat ('jscode2/YamlDictionary ' , $ countTranslations );
243+ }
244+
211245 public function testPhpCode ()
212246 {
213247 $ translations = static ::get ('phpcode/input ' , 'PhpCode ' );
0 commit comments