From 41d5cc579df5308f4b6deb6b412358dd72a068be Mon Sep 17 00:00:00 2001 From: Damien Alleyne <31164683+d-alleyne@users.noreply.github.com> Date: Fri, 6 Sep 2024 06:20:52 -0400 Subject: [PATCH] Update tests now that Terser's conditional optimization has been disabled --- .../tests/__snapshots__/build.test.js.snap | 244 +----------------- 1 file changed, 7 insertions(+), 237 deletions(-) diff --git a/projects/js-packages/i18n-check-webpack-plugin/tests/__snapshots__/build.test.js.snap b/projects/js-packages/i18n-check-webpack-plugin/tests/__snapshots__/build.test.js.snap index c01f8541166ad..bc74885226d7f 100644 --- a/projects/js-packages/i18n-check-webpack-plugin/tests/__snapshots__/build.test.js.snap +++ b/projects/js-packages/i18n-check-webpack-plugin/tests/__snapshots__/build.test.js.snap @@ -102,9 +102,6 @@ exports[`Webpack \`known-problems\`: Webpack build files 1`] = ` exports[`Webpack \`known-problems\`: Webpack build stats 1`] = ` { "errors": [ - { - "message": "main.js:3:148: msgid argument is not a string literal: __(o?"Foo is set":"Foo is not set","domain")", - }, { "message": "main.js: Translator comments have gone missing for "The comment will be lost when the assignment is merged into the above const" (context "context") - Translators: This comment will be lost", @@ -113,11 +110,6 @@ exports[`Webpack \`known-problems\`: Webpack build stats 1`] = ` "message": "main.js: Translator comments have gone missing for "This is another workaround" (context "context") - Translators: This comment will be in the source but not detected for the right message.", }, - { - "message": "main.js: Optimization seems to have broken the following translation strings: - - "Foo is not set" - - "Foo is set"", - }, ], "warnings": [], } @@ -165,245 +157,32 @@ exports[`Webpack \`options-filter\`: Webpack build stats 1`] = ` { "children": [ { - "errors": [ - { - "message": "string/main.js:1:76: msgid argument is not a string literal: __(t?"arr is set":"arr is not set","domain")", - }, - { - "message": "string/main.js:1:186: msgid argument is not a string literal: __(t?"func is set":"func is not set","domain")", - }, - { - "message": "string/main.js:1:374: msgid argument is not a string literal: __(t?"regex is set":"regex is not set","domain")", - }, - { - "message": "string/main.js:1:488: msgid argument is not a string literal: __(t?"string is set":"string is not set","domain")", - }, - { - "message": "string/main.js: Optimization seems to have broken the following translation strings: - - "string is not set" - - "string is set"", - }, - ], + "errors": [], "name": "string", "warnings": [], }, { - "errors": [ - { - "message": "regex/main.js:1:76: msgid argument is not a string literal: __(t?"arr is set":"arr is not set","domain")", - }, - { - "message": "regex/main.js:1:186: msgid argument is not a string literal: __(t?"func is set":"func is not set","domain")", - }, - { - "message": "regex/main.js:1:374: msgid argument is not a string literal: __(t?"regex is set":"regex is not set","domain")", - }, - { - "message": "regex/main.js:1:488: msgid argument is not a string literal: __(t?"string is set":"string is not set","domain")", - }, - { - "message": "regex/main.js: Optimization seems to have broken the following translation strings: - - "regex is not set" - - "regex is set"", - }, - ], + "errors": [], "name": "regex", "warnings": [], }, { - "errors": [ - { - "message": "function/main.js:1:76: msgid argument is not a string literal: __(t?"arr is set":"arr is not set","domain")", - }, - { - "message": "function/main.js:1:186: msgid argument is not a string literal: __(t?"func is set":"func is not set","domain")", - }, - { - "message": "function/main.js:1:374: msgid argument is not a string literal: __(t?"regex is set":"regex is not set","domain")", - }, - { - "message": "function/main.js:1:488: msgid argument is not a string literal: __(t?"string is set":"string is not set","domain")", - }, - { - "message": "function/main.js: Optimization seems to have broken the following translation strings: - - "func is not set" - - "func is set"", - }, - ], + "errors": [], "name": "function", "warnings": [], }, { - "errors": [ - { - "message": "array/main.js:1:76: msgid argument is not a string literal: __(t?"arr is set":"arr is not set","domain")", - }, - { - "message": "array/main.js:1:186: msgid argument is not a string literal: __(t?"func is set":"func is not set","domain")", - }, - { - "message": "array/main.js:1:374: msgid argument is not a string literal: __(t?"regex is set":"regex is not set","domain")", - }, - { - "message": "array/main.js:1:488: msgid argument is not a string literal: __(t?"string is set":"string is not set","domain")", - }, - { - "message": "array/main.js: Optimization seems to have broken the following translation strings: - - "arr is not set" - - "arr is set"", - }, - ], + "errors": [], "name": "array", "warnings": [], }, { - "errors": [ - { - "message": "undefined/main.js:1:76: msgid argument is not a string literal: __(t?"arr is set":"arr is not set","domain")", - }, - { - "message": "undefined/main.js:1:186: msgid argument is not a string literal: __(t?"func is set":"func is not set","domain")", - }, - { - "message": "undefined/main.js:1:374: msgid argument is not a string literal: __(t?"regex is set":"regex is not set","domain")", - }, - { - "message": "undefined/main.js:1:488: msgid argument is not a string literal: __(t?"string is set":"string is not set","domain")", - }, - { - "message": "undefined/main.js: Optimization seems to have broken the following translation strings: - - "arr is not set" - - "arr is set" - - "func is not set" - - "func is set" - - "regex is not set" - - "regex is set" - - "string is not set" - - "string is set"", - }, - ], + "errors": [], "name": "undefined", "warnings": [], }, ], - "errors": [ - { - "compilerPath": "string", - "message": "string/main.js:1:76: msgid argument is not a string literal: __(t?"arr is set":"arr is not set","domain")", - }, - { - "compilerPath": "string", - "message": "string/main.js:1:186: msgid argument is not a string literal: __(t?"func is set":"func is not set","domain")", - }, - { - "compilerPath": "string", - "message": "string/main.js:1:374: msgid argument is not a string literal: __(t?"regex is set":"regex is not set","domain")", - }, - { - "compilerPath": "string", - "message": "string/main.js:1:488: msgid argument is not a string literal: __(t?"string is set":"string is not set","domain")", - }, - { - "compilerPath": "string", - "message": "string/main.js: Optimization seems to have broken the following translation strings: - - "string is not set" - - "string is set"", - }, - { - "compilerPath": "regex", - "message": "regex/main.js:1:76: msgid argument is not a string literal: __(t?"arr is set":"arr is not set","domain")", - }, - { - "compilerPath": "regex", - "message": "regex/main.js:1:186: msgid argument is not a string literal: __(t?"func is set":"func is not set","domain")", - }, - { - "compilerPath": "regex", - "message": "regex/main.js:1:374: msgid argument is not a string literal: __(t?"regex is set":"regex is not set","domain")", - }, - { - "compilerPath": "regex", - "message": "regex/main.js:1:488: msgid argument is not a string literal: __(t?"string is set":"string is not set","domain")", - }, - { - "compilerPath": "regex", - "message": "regex/main.js: Optimization seems to have broken the following translation strings: - - "regex is not set" - - "regex is set"", - }, - { - "compilerPath": "function", - "message": "function/main.js:1:76: msgid argument is not a string literal: __(t?"arr is set":"arr is not set","domain")", - }, - { - "compilerPath": "function", - "message": "function/main.js:1:186: msgid argument is not a string literal: __(t?"func is set":"func is not set","domain")", - }, - { - "compilerPath": "function", - "message": "function/main.js:1:374: msgid argument is not a string literal: __(t?"regex is set":"regex is not set","domain")", - }, - { - "compilerPath": "function", - "message": "function/main.js:1:488: msgid argument is not a string literal: __(t?"string is set":"string is not set","domain")", - }, - { - "compilerPath": "function", - "message": "function/main.js: Optimization seems to have broken the following translation strings: - - "func is not set" - - "func is set"", - }, - { - "compilerPath": "array", - "message": "array/main.js:1:76: msgid argument is not a string literal: __(t?"arr is set":"arr is not set","domain")", - }, - { - "compilerPath": "array", - "message": "array/main.js:1:186: msgid argument is not a string literal: __(t?"func is set":"func is not set","domain")", - }, - { - "compilerPath": "array", - "message": "array/main.js:1:374: msgid argument is not a string literal: __(t?"regex is set":"regex is not set","domain")", - }, - { - "compilerPath": "array", - "message": "array/main.js:1:488: msgid argument is not a string literal: __(t?"string is set":"string is not set","domain")", - }, - { - "compilerPath": "array", - "message": "array/main.js: Optimization seems to have broken the following translation strings: - - "arr is not set" - - "arr is set"", - }, - { - "compilerPath": "undefined", - "message": "undefined/main.js:1:76: msgid argument is not a string literal: __(t?"arr is set":"arr is not set","domain")", - }, - { - "compilerPath": "undefined", - "message": "undefined/main.js:1:186: msgid argument is not a string literal: __(t?"func is set":"func is not set","domain")", - }, - { - "compilerPath": "undefined", - "message": "undefined/main.js:1:374: msgid argument is not a string literal: __(t?"regex is set":"regex is not set","domain")", - }, - { - "compilerPath": "undefined", - "message": "undefined/main.js:1:488: msgid argument is not a string literal: __(t?"string is set":"string is not set","domain")", - }, - { - "compilerPath": "undefined", - "message": "undefined/main.js: Optimization seems to have broken the following translation strings: - - "arr is not set" - - "arr is set" - - "func is not set" - - "func is set" - - "regex is not set" - - "regex is set" - - "string is not set" - - "string is set"", - }, - ], + "errors": [], "warnings": [], } `; @@ -420,16 +199,7 @@ exports[`Webpack \`options-warnOnly\`: Webpack build files 1`] = ` exports[`Webpack \`options-warnOnly\`: Webpack build stats 1`] = ` { "errors": [], - "warnings": [ - { - "message": "main.js:1:77: msgid argument is not a string literal: __(t?"X is set":"X is not set","domain")", - }, - { - "message": "main.js: Optimization seems to have broken the following translation strings: - - "X is not set" - - "X is set"", - }, - ], + "warnings": [], } `;