jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/359458 )

Change subject: Add JS test hook
......................................................................


Add JS test hook

Prepare the JavaScript to be testable

Change-Id: I6961d8dd429e27d6115fb530f37412f44fbe1945
---
M AdvancedSearch.hooks.php
M extension.json
2 files changed, 18 insertions(+), 0 deletions(-)

Approvals:
  Tobias Gritschacher: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/AdvancedSearch.hooks.php b/AdvancedSearch.hooks.php
index 24000a9..2cdf9fa 100644
--- a/AdvancedSearch.hooks.php
+++ b/AdvancedSearch.hooks.php
@@ -4,6 +4,7 @@
 
 use BetaFeatures;
 use MediaWiki\MediaWikiServices;
+use ResourceLoader;
 use SpecialPage;
 use User;
 
@@ -71,4 +72,18 @@
                        => 
'https://www.mediawiki.org/wiki/Extension_talk:AdvancedSearch',
                ];
        }
+
+       public static function onResourceLoaderTestModules( array 
&$testModules, ResourceLoader $rl ) {
+               $testModules['qunit']['ext.advancedSearch.tests'] = [
+                       'scripts' => [
+                               // 'tests/qunit/YourTestName.test.js'
+                       ],
+                       'dependencies' => [
+                               // 'ext.advancedSearch.moduleName'
+                               'oojs-ui'
+                       ],
+                       'localBasePath' => __DIR__,
+                       'remoteExtPath' => 'AdvancedSearch',
+               ];
+       }
 }
diff --git a/extension.json b/extension.json
index c530165..772f2d0 100644
--- a/extension.json
+++ b/extension.json
@@ -16,6 +16,9 @@
                "GetBetaFeaturePreferences": [
                        "AdvancedSearch\\Hooks::getBetaFeaturePreferences"
                ],
+               "ResourceLoaderTestModules": [
+                       "AdvancedSearch\\Hooks::onResourceLoaderTestModules"
+               ],
                "SpecialPageBeforeExecute": [
                        "AdvancedSearch\\Hooks::onSpecialPageBeforeExecute"
                ],

-- 
To view, visit https://gerrit.wikimedia.org/r/359458
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I6961d8dd429e27d6115fb530f37412f44fbe1945
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/AdvancedSearch
Gerrit-Branch: master
Gerrit-Owner: Gabriel Birke <gabriel.bi...@wikimedia.de>
Gerrit-Reviewer: Addshore <addshorew...@gmail.com>
Gerrit-Reviewer: Andrew-WMDE <andrew.kos...@wikimedia.de>
Gerrit-Reviewer: Tobias Gritschacher <tobias.gritschac...@wikimedia.de>
Gerrit-Reviewer: WMDE-Fisch <christoph.jau...@wikimedia.de>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to