Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests for rspack and esbuild bundle output #404

Merged
merged 2 commits into from
Jun 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions features/makepot.feature
Original file line number Diff line number Diff line change
Expand Up @@ -1838,6 +1838,17 @@ Feature: Generate a POT file of a WordPress project
Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__["__"])( 'webpack.__', 'foo-plugin' );
Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__[/* __ */ "a"])( 'webpack.mangle.__', 'foo-plugin' );

(0,wp__WEBPACK_IMPORTED_MODULE_5__.__)("rspack.__", "foo-plugin");
wp__WEBPACK_IMPORTED_MODULE_5___default().__("rspack.default-import.__", "foo-plugin");
wp__WEBPACK_IMPORTED_MODULE_5__.__("rspack.default-star-import.__", "foo-plugin");

var import_wp = __require("wp");
var import_wp2 = __toESM(__require("wp"));
var wpStarImport = __toESM(__require("wp"));
console.log((0, import_wp.__)("esbuild.__", "foo-plugin"));
console.log(import_wp2.default.__("esbuild.default-import.__", "foo-plugin"));
console.log(wpStarImport.__("esbuild.default-star-import.__", "foo-plugin"));

Object(u.__)( 'minified.__', 'foo-plugin' );
Object(j._x)( 'minified._x', 'minified._x_context', 'foo-plugin' );

Expand Down Expand Up @@ -1918,6 +1929,30 @@ Feature: Generate a POT file of a WordPress project
"""
msgid "webpack.mangle.__"
"""
And the foo-plugin/foo-plugin.pot file should contain:
"""
msgid "rspack.__"
"""
And the foo-plugin/foo-plugin.pot file should contain:
"""
msgid "rspack.default-import.__"
"""
And the foo-plugin/foo-plugin.pot file should contain:
"""
msgid "rspack.default-star-import.__"
"""
And the foo-plugin/foo-plugin.pot file should contain:
"""
msgid "esbuild.__"
"""
And the foo-plugin/foo-plugin.pot file should contain:
"""
msgid "esbuild.default-import.__"
"""
And the foo-plugin/foo-plugin.pot file should contain:
"""
msgid "esbuild.default-star-import.__"
"""
And the foo-plugin/foo-plugin.pot file should contain:
"""
msgid "minified.__"
Expand Down