mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeMirror
synced 2024-11-23 22:03:28 +00:00
Use QUnitTestModule instead of deprecated ResourceLoaderTestModules
Bug: T232875 Change-Id: I84276ff7c30b9c1db5dd8e9532512d7f586ab401
This commit is contained in:
parent
8829e2335c
commit
85e56bb200
|
@ -137,15 +137,24 @@
|
|||
"localBasePath": "resources",
|
||||
"remoteExtPath": "CodeMirror/resources"
|
||||
},
|
||||
"QUnitTestModule": {
|
||||
"localBasePath": "",
|
||||
"remoteExtPath": "CodeMirror",
|
||||
"scripts": [
|
||||
"resources/mode/mediawiki/tests/qunit/CodeMirror.mediawiki.test.js"
|
||||
],
|
||||
"dependencies": [
|
||||
"ext.CodeMirror.data",
|
||||
"ext.CodeMirror.lib",
|
||||
"ext.CodeMirror.mode.mediawiki"
|
||||
]
|
||||
},
|
||||
"Hooks": {
|
||||
"BeforePageDisplay": [
|
||||
"CodeMirrorHooks::onBeforePageDisplay"
|
||||
],
|
||||
"GetPreferences": [
|
||||
"CodeMirrorHooks::onGetPreferences"
|
||||
],
|
||||
"ResourceLoaderTestModules": [
|
||||
"CodeMirrorHooks::onResourceLoaderTestModules"
|
||||
]
|
||||
},
|
||||
"VisualEditorPluginModules": [
|
||||
|
|
|
@ -61,27 +61,4 @@ class CodeMirrorHooks {
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Register test modules for CodeMirror.
|
||||
*
|
||||
* @see https://www.mediawiki.org/wiki/Manual:Hooks/ResourceLoaderTestModules
|
||||
*
|
||||
* @param array &$modules
|
||||
* @param ResourceLoader $rl
|
||||
*/
|
||||
public static function onResourceLoaderTestModules( array &$modules, ResourceLoader $rl ) {
|
||||
$modules['qunit']['ext.CodeMirror.test'] = [
|
||||
'scripts' => [
|
||||
'resources/mode/mediawiki/tests/qunit/CodeMirror.mediawiki.test.js',
|
||||
],
|
||||
'dependencies' => [
|
||||
'ext.CodeMirror.data',
|
||||
'ext.CodeMirror.lib',
|
||||
'ext.CodeMirror.mode.mediawiki',
|
||||
],
|
||||
'localBasePath' => __DIR__ . '/../',
|
||||
'remoteExtPath' => 'CodeMirror',
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue