diff --git a/core/.eslintignore b/core/.eslintignore index ac3272e162..fae394892b 100644 --- a/core/.eslintignore +++ b/core/.eslintignore @@ -1,6 +1,6 @@ assets/vendor/**/* -modules/locale/tests/locale_test.js node_modules/**/* **/js_test_files/**/* *.js !*.es6.js +modules/locale/tests/locale_test.es6.js diff --git a/core/modules/locale/tests/src/Functional/LocaleJavascriptTranslationTest.php b/core/modules/locale/tests/src/Functional/LocaleJavascriptTranslationTest.php index bbb825832b..55582ba0c0 100644 --- a/core/modules/locale/tests/src/Functional/LocaleJavascriptTranslationTest.php +++ b/core/modules/locale/tests/src/Functional/LocaleJavascriptTranslationTest.php @@ -21,8 +21,14 @@ class LocaleJavascriptTranslationTest extends BrowserTestBase { public static $modules = ['locale', 'locale_test']; public function testFileParsing() { - $filename = __DIR__ . '/../../locale_test.js'; + // Testing the original file. + $files[] = __DIR__ . '/../../locale_test.es6.js'; + + // Testing the processed file. + $files[] = __DIR__ . '/../../locale_test.js'; + + foreach ($files as $filename) { // Parse the file to look for source strings. _locale_parse_js_file($filename); @@ -89,6 +95,7 @@ public function testFileParsing() { $this->assertEqual(count($source_strings), count($test_strings), 'Found correct number of source strings.'); } + } /** * Assert translations JS is added before drupal.js, because it depends on it.