mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-09-24 10:49:14 +00:00
tests: Actually run QUnit tests
I225019b8 introduced a regression where empty Resource Loader modules, i.e. modules without any scripts, were being added in the ResourceLoaderTestModules handler because the base directory wasn't being calculated properly. Change-Id: I25b01b2b5a4fe78e5c784eeba25bdaec37198abf
This commit is contained in:
parent
e9012c1fcd
commit
61b4e70dea
|
@ -119,7 +119,7 @@ class PopupsHooks {
|
|||
*/
|
||||
public static function onResourceLoaderTestModules( array &$testModules,
|
||||
ResourceLoader &$resourceLoader ) {
|
||||
$localBasePath = __DIR__;
|
||||
$localBasePath = __DIR__ . '/..';
|
||||
$scripts = glob( "{$localBasePath}/tests/qunit/ext.popups/{,**/}*.test.js", GLOB_BRACE );
|
||||
$start = strlen( $localBasePath ) + 1;
|
||||
|
||||
|
@ -129,13 +129,13 @@ class PopupsHooks {
|
|||
|
||||
$testModules['qunit']['ext.popups.tests.stubs'] = [
|
||||
'scripts' => [
|
||||
'../tests/qunit/ext.popups/stubs/index.js',
|
||||
'../tests/qunit/ext.popups/stubs/user.js',
|
||||
'tests/qunit/ext.popups/stubs/index.js',
|
||||
'tests/qunit/ext.popups/stubs/user.js',
|
||||
],
|
||||
'dependencies' => [
|
||||
'ext.popups', // The mw.popups is required.
|
||||
],
|
||||
'localBasePath' => __DIR__,
|
||||
'localBasePath' => $localBasePath,
|
||||
'remoteExtPath' => 'Popups',
|
||||
];
|
||||
|
||||
|
@ -145,7 +145,7 @@ class PopupsHooks {
|
|||
'ext.popups',
|
||||
'ext.popups.tests.stubs',
|
||||
],
|
||||
'localBasePath' => __DIR__,
|
||||
'localBasePath' => $localBasePath,
|
||||
'remoteExtPath' => 'Popups',
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue