WMDE-leszek has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/384017 )
Change subject: Do not run QUnit tests using MediaWiki runner ...................................................................... Do not run QUnit tests using MediaWiki runner This is going to become a "stand-alone" library, not an extension, so it does make much to have its tests run with MediaWiki. Karma runner now also allows running QUnit tests. This library still is a wrapper around mw.Api JS class but the dependency should not be go beyond this. Bug: T178088 Change-Id: I8b5d2439df676b50f19741276604c1762bb33d0f --- M init.mw.php D resources.test.php D tests/resources.php 3 files changed, 0 insertions(+), 60 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikibaseJavaScriptApi refs/changes/17/384017/1 diff --git a/init.mw.php b/init.mw.php index e7d016a..2f83dc0 100644 --- a/init.mw.php +++ b/init.mw.php @@ -17,4 +17,3 @@ ]; include __DIR__ . '/resources.php'; -include __DIR__ . '/resources.test.php'; diff --git a/resources.test.php b/resources.test.php deleted file mode 100644 index 859663a..0000000 --- a/resources.test.php +++ /dev/null @@ -1,17 +0,0 @@ -<?php - -/** - * @license GPL-2.0+ - * @author Daniel Werner - * @author H. Snater < mediaw...@snater.com > - */ -global $wgHooks; -$wgHooks['ResourceLoaderTestModules'][] = function ( - array &$testModules, - ResourceLoader &$resourceLoader -) { - $testModules['qunit'] = array_merge( - $testModules['qunit'], - include __DIR__ . '/tests/resources.php' - ); -}; diff --git a/tests/resources.php b/tests/resources.php deleted file mode 100644 index ec320de..0000000 --- a/tests/resources.php +++ /dev/null @@ -1,42 +0,0 @@ -<?php - -/** - * @license GPL-2.0+ - * @author H. Snater < mediaw...@snater.com > - * - * @codeCoverageIgnoreStart - */ -return call_user_func( function () { - preg_match( '+' . preg_quote( DIRECTORY_SEPARATOR ) . '(?:vendor|extensions)' - . preg_quote( DIRECTORY_SEPARATOR ) . '.*+', __DIR__, $remoteExtPath ); - - $moduleTemplate = [ - 'localBasePath' => __DIR__, - 'remoteExtPath' => '..' . $remoteExtPath[0], - ]; - - return [ - 'wikibase.api.RepoApi.tests' => $moduleTemplate + [ - 'scripts' => [ - 'RepoApi.tests.js', - ], - 'dependencies' => [ - 'wikibase.api.getLocationAgnosticMwApi', - 'wikibase.api.RepoApi', - ], - ], - - 'wikibase.api.RepoApiError.tests' => $moduleTemplate + [ - 'scripts' => [ - 'RepoApiError.tests.js', - ], - 'dependencies' => [ - 'wikibase.api.RepoApiError', - ], - 'messages' => [ - 'wikibase-error-unexpected', - 'wikibase-error-remove-timeout', - ], - ], - ]; -} ); -- To view, visit https://gerrit.wikimedia.org/r/384017 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8b5d2439df676b50f19741276604c1762bb33d0f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikibaseJavaScriptApi Gerrit-Branch: master Gerrit-Owner: WMDE-leszek <leszek.mani...@wikimedia.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits