Skip to content

Commit 07be405

Browse files
committed
Do not run QUnit tests with MediaWiki test runner
1 parent 7d563b8 commit 07be405

File tree

2 files changed

+9
-51
lines changed

2 files changed

+9
-51
lines changed

DataValuesJavaScript.php

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -38,54 +38,3 @@
3838
include __DIR__ . '/lib/resources.php',
3939
include __DIR__ . '/src/resources.php'
4040
);
41-
42-
/**
43-
* Register QUnit test base classes used by test modules in dependent components.
44-
* @see https://www.mediawiki.org/wiki/Manual:Hooks/ResourceLoaderTestModules
45-
* @since 0.1
46-
*
47-
* @param array &$testModules
48-
* @param \ResourceLoader &$resourceLoader
49-
*
50-
* @return boolean
51-
*/
52-
$GLOBALS['wgHooks']['ResourceLoaderTestModules'][] = function(
53-
array &$testModules,
54-
\ResourceLoader &$resourceLoader
55-
) {
56-
preg_match( '+' . preg_quote( DIRECTORY_SEPARATOR ) . '(?:vendor|extensions)'
57-
. preg_quote( DIRECTORY_SEPARATOR ) . '.*+', __DIR__, $remoteExtPath );
58-
59-
$moduleTemplate = [
60-
'localBasePath' => __DIR__ . '/tests',
61-
'remoteExtPath' => '..' . $remoteExtPath[0] . DIRECTORY_SEPARATOR . 'tests',
62-
];
63-
64-
$testModuleTemplates = [
65-
'valueFormatters.tests' => $moduleTemplate + [
66-
'scripts' => [
67-
'src/valueFormatters/valueFormatters.tests.js',
68-
],
69-
'dependencies' => [
70-
'dataValues.DataValue',
71-
'util.inherit',
72-
'valueFormatters',
73-
],
74-
],
75-
76-
'valueParsers.tests' => $moduleTemplate + [
77-
'scripts' => [
78-
'src/valueParsers/valueParsers.tests.js',
79-
],
80-
'dependencies' => [
81-
'dataValues.DataValue',
82-
'util.inherit',
83-
'valueParsers',
84-
],
85-
],
86-
];
87-
88-
$testModules['qunit'] = array_merge( $testModules['qunit'], $testModuleTemplates );
89-
90-
return true;
91-
};

tests/.eslintrc.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"extends": "../.eslintrc.json",
3+
"env": {
4+
"qunit": true
5+
},
6+
"rules": {
7+
"dot-notation": "off"
8+
}
9+
}

0 commit comments

Comments
 (0)