Adrian Lang has uploaded a new change for review. https://gerrit.wikimedia.org/r/201160
Change subject: Move wikibase.view JS tests into subdirectory ...................................................................... Move wikibase.view JS tests into subdirectory Most JavaScript modules that will reside in WikibaseView are not under `wikibase.view`. They are not even all under `wikibase`. This is a prerequisite for T93745. Change-Id: I8c83837e77c4e803699688f2fb6ff1399e776209 --- M view/tests/qunit/resources.php R view/tests/qunit/wikibase/view/ViewFactory.tests.js A view/tests/qunit/wikibase/view/resources.php 3 files changed, 34 insertions(+), 25 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/60/201160/1 diff --git a/view/tests/qunit/resources.php b/view/tests/qunit/resources.php index 5e0bc17..b9d0010 100644 --- a/view/tests/qunit/resources.php +++ b/view/tests/qunit/resources.php @@ -4,28 +4,6 @@ * @license GNU GPL v2+ * @author Adrian Heine < adrian.he...@wikimedia.de > */ -return call_user_func( function() { - preg_match( '+' . preg_quote( DIRECTORY_SEPARATOR ) . '(?:vendor|extensions)' - . preg_quote( DIRECTORY_SEPARATOR ) . '.*+', __DIR__, $remoteExtPath ); - - $moduleTemplate = array( - 'localBasePath' => __DIR__, - 'remoteExtPath' => '..' . $remoteExtPath[0] - ); - - $modules = array( - - 'wikibase.view.ViewFactory.tests' => $moduleTemplate + array( - 'scripts' => array( - 'ViewFactory.tests.js', - ), - 'dependencies' => array( - 'wikibase.view.ViewFactory', - 'wikibase.ValueViewBuilder' - ), - ), - - ); - - return $modules; -} ); +return array_merge( + include( __DIR__ . '/wikibase/view/resources.php' ) +); diff --git a/view/tests/qunit/ViewFactory.tests.js b/view/tests/qunit/wikibase/view/ViewFactory.tests.js similarity index 100% rename from view/tests/qunit/ViewFactory.tests.js rename to view/tests/qunit/wikibase/view/ViewFactory.tests.js diff --git a/view/tests/qunit/wikibase/view/resources.php b/view/tests/qunit/wikibase/view/resources.php new file mode 100644 index 0000000..5e0bc17 --- /dev/null +++ b/view/tests/qunit/wikibase/view/resources.php @@ -0,0 +1,31 @@ +<?php + +/** + * @license GNU GPL v2+ + * @author Adrian Heine < adrian.he...@wikimedia.de > + */ +return call_user_func( function() { + preg_match( '+' . preg_quote( DIRECTORY_SEPARATOR ) . '(?:vendor|extensions)' + . preg_quote( DIRECTORY_SEPARATOR ) . '.*+', __DIR__, $remoteExtPath ); + + $moduleTemplate = array( + 'localBasePath' => __DIR__, + 'remoteExtPath' => '..' . $remoteExtPath[0] + ); + + $modules = array( + + 'wikibase.view.ViewFactory.tests' => $moduleTemplate + array( + 'scripts' => array( + 'ViewFactory.tests.js', + ), + 'dependencies' => array( + 'wikibase.view.ViewFactory', + 'wikibase.ValueViewBuilder' + ), + ), + + ); + + return $modules; +} ); -- To view, visit https://gerrit.wikimedia.org/r/201160 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8c83837e77c4e803699688f2fb6ff1399e776209 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Adrian Lang <adrian.he...@wikimedia.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits