Current File : /home/jvzmxxx/wiki1/extensions/Cards/includes/Cards.hooks.php
<?php
/**
 * Hooks for Cards extension
 *
 * @file
 * @ingroup Extensions
 */

namespace Cards;

use ResourceLoader;

class Hooks {

	/**
	 * Register QUnit tests.
	 *
	 * @see https://www.mediawiki.org/wiki/Manual:Hooks/ResourceLoaderTestModules
	 * @param array $testModules
	 * @param ResourceLoader $resourceLoader
	 * @return bool
	 */
	public static function onResourceLoaderTestModules(
		array &$testModules, ResourceLoader &$resourceLoader ) {
		$resourceFileModulePaths = [
			'localBasePath' => __DIR__ . '/../tests/qunit/',
			'remoteExtPath' => 'Cards/tests/qunit',
			'targets' => [ 'mobile' ],
		];

		$testModules['qunit']['ext.cards.tests'] = [
			'dependencies' => [
				'ext.cards'
			],
			'scripts' => [
				'CardModel.js',
				'CardsGateway.js',
				'CardView.js',
			]
		] + $resourceFileModulePaths;

		return true;
	}
}