This run took 242 seconds.
$ date --- stdout --- Tue Oct 7 00:08:59 UTC 2025 --- end --- $ git clone file:///srv/git/mediawiki-core.git repo --depth=1 -b master --- stderr --- Cloning into 'repo'... Updating files: 62% (7502/11967) Updating files: 63% (7540/11967) Updating files: 64% (7659/11967) Updating files: 65% (7779/11967) Updating files: 66% (7899/11967) Updating files: 67% (8018/11967) Updating files: 68% (8138/11967) Updating files: 69% (8258/11967) Updating files: 70% (8377/11967) Updating files: 71% (8497/11967) Updating files: 72% (8617/11967) Updating files: 73% (8736/11967) Updating files: 74% (8856/11967) Updating files: 75% (8976/11967) Updating files: 76% (9095/11967) Updating files: 77% (9215/11967) Updating files: 78% (9335/11967) Updating files: 79% (9454/11967) Updating files: 80% (9574/11967) Updating files: 81% (9694/11967) Updating files: 82% (9813/11967) Updating files: 83% (9933/11967) Updating files: 84% (10053/11967) Updating files: 85% (10172/11967) Updating files: 86% (10292/11967) Updating files: 87% (10412/11967) Updating files: 88% (10531/11967) Updating files: 89% (10651/11967) Updating files: 90% (10771/11967) Updating files: 91% (10890/11967) Updating files: 92% (11010/11967) Updating files: 93% (11130/11967) Updating files: 94% (11249/11967) Updating files: 95% (11369/11967) Updating files: 96% (11489/11967) Updating files: 97% (11608/11967) Updating files: 98% (11728/11967) Updating files: 99% (11848/11967) Updating files: 100% (11967/11967) Updating files: 100% (11967/11967), done. --- stdout --- --- end --- $ git config user.name libraryupgrader --- stdout --- --- end --- $ git config user.email tools.libraryupgrader@tools.wmflabs.org --- stdout --- --- end --- $ git submodule update --init --- stdout --- --- end --- $ grr init --- stdout --- Installed commit-msg hook. --- end --- $ git show-ref refs/heads/master --- stdout --- 975dada200fa3d59f69fee53870612e4f09acc8d refs/heads/master --- end --- $ /usr/bin/npm audit --json --- stdout --- { "auditReportVersion": 2, "vulnerabilities": { "axios": { "name": "axios", "severity": "high", "isDirect": false, "via": [ { "source": 1097679, "name": "axios", "dependency": "axios", "title": "Axios Cross-Site Request Forgery Vulnerability", "url": "https://github.com/advisories/GHSA-wf5p-g6vw-rhxx", "severity": "moderate", "cwe": [ "CWE-352" ], "cvss": { "score": 6.5, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N" }, "range": ">=0.8.1 <0.28.0" }, { "source": 1103617, "name": "axios", "dependency": "axios", "title": "axios Requests Vulnerable To Possible SSRF and Credential Leakage via Absolute URL", "url": "https://github.com/advisories/GHSA-jr5f-v2jv-69x6", "severity": "high", "cwe": [ "CWE-918" ], "cvss": { "score": 0, "vectorString": null }, "range": "<0.30.0" }, { "source": 1108262, "name": "axios", "dependency": "axios", "title": "Axios is vulnerable to DoS attack through lack of data size check", "url": "https://github.com/advisories/GHSA-4hjh-wcwx-xvwj", "severity": "high", "cwe": [ "CWE-770" ], "cvss": { "score": 7.5, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H" }, "range": "<0.30.2" } ], "effects": [ "openapi-validator" ], "range": "<=0.30.1", "nodes": [ "node_modules/axios" ], "fixAvailable": { "name": "chai-openapi-response-validator", "version": "0.14.1", "isSemVerMajor": true } }, "chai-openapi-response-validator": { "name": "chai-openapi-response-validator", "severity": "high", "isDirect": true, "via": [ "openapi-validator" ], "effects": [], "range": "0.11.2 || >=0.14.2-alpha.0", "nodes": [ "node_modules/chai-openapi-response-validator" ], "fixAvailable": { "name": "chai-openapi-response-validator", "version": "0.14.1", "isSemVerMajor": true } }, "form-data": { "name": "form-data", "severity": "critical", "isDirect": false, "via": [ { "source": 1106509, "name": "form-data", "dependency": "form-data", "title": "form-data uses unsafe random function in form-data for choosing boundary", "url": "https://github.com/advisories/GHSA-fjxv-7rqg-78g4", "severity": "critical", "cwe": [ "CWE-330" ], "cvss": { "score": 0, "vectorString": null }, "range": "<2.5.4" } ], "effects": [ "request" ], "range": "<2.5.4", "nodes": [ "node_modules/request/node_modules/form-data" ], "fixAvailable": { "name": "mwbot", "version": "0.1.5", "isSemVerMajor": true } }, "mwbot": { "name": "mwbot", "severity": "moderate", "isDirect": false, "via": [ "request" ], "effects": [], "range": ">=0.1.6", "nodes": [ "node_modules/mwbot" ], "fixAvailable": { "name": "mwbot", "version": "0.1.5", "isSemVerMajor": true } }, "openapi-validator": { "name": "openapi-validator", "severity": "high", "isDirect": false, "via": [ "axios" ], "effects": [ "chai-openapi-response-validator" ], "range": ">=0.14.2-alpha.0", "nodes": [ "node_modules/openapi-validator" ], "fixAvailable": { "name": "chai-openapi-response-validator", "version": "0.14.1", "isSemVerMajor": true } }, "request": { "name": "request", "severity": "critical", "isDirect": false, "via": [ { "source": 1096727, "name": "request", "dependency": "request", "title": "Server-Side Request Forgery in Request", "url": "https://github.com/advisories/GHSA-p8p7-x288-28g6", "severity": "moderate", "cwe": [ "CWE-918" ], "cvss": { "score": 6.1, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N" }, "range": "<=2.88.2" }, "form-data", "tough-cookie" ], "effects": [ "mwbot" ], "range": "*", "nodes": [ "node_modules/request" ], "fixAvailable": { "name": "mwbot", "version": "0.1.5", "isSemVerMajor": true } }, "tough-cookie": { "name": "tough-cookie", "severity": "moderate", "isDirect": false, "via": [ { "source": 1097682, "name": "tough-cookie", "dependency": "tough-cookie", "title": "tough-cookie Prototype Pollution vulnerability", "url": "https://github.com/advisories/GHSA-72xf-g2v4-qvf3", "severity": "moderate", "cwe": [ "CWE-1321" ], "cvss": { "score": 6.5, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N" }, "range": "<4.1.3" } ], "effects": [ "request" ], "range": "<4.1.3", "nodes": [ "node_modules/request/node_modules/tough-cookie" ], "fixAvailable": { "name": "mwbot", "version": "0.1.5", "isSemVerMajor": true } } }, "metadata": { "vulnerabilities": { "info": 0, "low": 0, "moderate": 2, "high": 3, "critical": 2, "total": 7 }, "dependencies": { "prod": 1, "dev": 1832, "optional": 38, "peer": 2, "peerOptional": 0, "total": 1832 } } } --- end --- $ /usr/bin/composer install --- stderr --- No composer.lock file present. Updating dependencies to latest instead of installing from lock file. See https://getcomposer.org/install for more information. > MediaWiki\Composer\VersionChecker::onEvent Loading composer repositories with package information Updating dependencies Lock file operations: 139 installs, 0 updates, 0 removals - Locking composer/pcre (3.3.2) - Locking composer/semver (3.4.4) - Locking composer/spdx-licenses (1.5.9) - Locking composer/xdebug-handler (3.0.5) - Locking dealerdirect/phpcodesniffer-composer-installer (v1.1.2) - Locking doctrine/dbal (3.10.0) - Locking doctrine/deprecations (1.1.5) - Locking doctrine/event-manager (2.0.1) - Locking doctrine/instantiator (2.0.0) - Locking doctrine/sql-formatter (1.5.2) - Locking felixfbecker/advanced-json-rpc (v3.2.1) - Locking giorgiosironi/eris (0.14.1) - Locking guzzlehttp/guzzle (7.10.0) - Locking guzzlehttp/promises (2.3.0) - Locking guzzlehttp/psr7 (2.8.0) - Locking hamcrest/hamcrest-php (v2.1.1) - Locking johnkary/phpunit-speedtrap (v4.0.1) - Locking justinrainbow/json-schema (5.3.0) - Locking lcobucci/clock (2.2.0) - Locking lcobucci/jwt (4.1.5) - Locking liuggio/statsd-php-client (v1.0.18) - Locking mck89/peast (v1.17.2) - Locking mediawiki/mediawiki-codesniffer (v48.0.0) - Locking mediawiki/mediawiki-phan-config (0.17.0) - Locking mediawiki/minus-x (1.1.3) - Locking mediawiki/phan-taint-check-plugin (7.0.0) - Locking microsoft/tolerant-php-parser (v0.1.2) - Locking monolog/monolog (2.9.3) - Locking myclabs/deep-copy (1.13.4) - Locking netresearch/jsonmapper (v4.5.0) - Locking nikic/php-parser (v5.6.1) - Locking oojs/oojs-ui (v0.53.0) - Locking pear/console_getopt (v1.4.3) - Locking pear/mail (v2.0.0) - Locking pear/mail_mime (1.10.12) - Locking pear/net_smtp (1.12.1) - Locking pear/net_socket (v1.2.2) - Locking pear/net_url2 (v2.2.3) - Locking pear/pear-core-minimal (v1.10.16) - Locking pear/pear_exception (v1.0.2) - Locking phan/phan (5.5.1) - Locking phar-io/manifest (2.0.4) - Locking phar-io/version (3.2.1) - Locking php-parallel-lint/php-console-color (v1.0.1) - Locking php-parallel-lint/php-console-highlighter (v1.0.0) - Locking php-parallel-lint/php-parallel-lint (v1.4.0) - Locking phpcsstandards/phpcsextra (1.4.0) - Locking phpcsstandards/phpcsutils (1.1.1) - Locking phpdocumentor/reflection-common (2.2.0) - Locking phpdocumentor/reflection-docblock (5.6.3) - Locking phpdocumentor/type-resolver (1.10.0) - Locking phpstan/phpdoc-parser (2.3.0) - Locking phpunit/php-code-coverage (9.2.32) - Locking phpunit/php-file-iterator (3.0.6) - Locking phpunit/php-invoker (3.1.1) - Locking phpunit/php-text-template (2.0.4) - Locking phpunit/php-timer (5.0.3) - Locking phpunit/phpunit (9.6.21) - Locking psr/cache (3.0.0) - Locking psr/clock (1.0.0) - Locking psr/container (2.0.2) - Locking psr/http-client (1.0.3) - Locking psr/http-factory (1.1.0) - Locking psr/http-message (1.1) - Locking psr/log (1.1.4) - Locking psy/psysh (v0.12.12) - Locking ralouphie/getallheaders (3.0.3) - Locking sabre/event (5.1.7) - Locking sebastian/cli-parser (1.0.2) - Locking sebastian/code-unit (1.0.8) - Locking sebastian/code-unit-reverse-lookup (2.0.3) - Locking sebastian/comparator (4.0.9) - Locking sebastian/complexity (2.0.3) - Locking sebastian/diff (4.0.6) - Locking sebastian/environment (5.1.5) - Locking sebastian/exporter (4.0.8) - Locking sebastian/global-state (5.0.8) - Locking sebastian/lines-of-code (1.0.4) - Locking sebastian/object-enumerator (4.0.4) - Locking sebastian/object-reflector (2.0.4) - Locking sebastian/recursion-context (4.0.6) - Locking sebastian/resource-operations (3.0.4) - Locking sebastian/type (3.2.1) - Locking sebastian/version (3.0.2) - Locking seld/jsonlint (1.11.0) - Locking squizlabs/php_codesniffer (3.13.2) - Locking stella-maris/clock (0.1.7) - Locking symfony/console (v7.3.4) - Locking symfony/deprecation-contracts (v3.6.0) - Locking symfony/polyfill-php82 (v1.33.0) - Locking symfony/polyfill-php83 (v1.33.0) - Locking symfony/polyfill-php84 (v1.33.0) - Locking symfony/service-contracts (v3.6.0) - Locking symfony/string (v7.3.4) - Locking symfony/var-dumper (v7.3.4) - Locking symfony/yaml (v6.4.25) - Locking theseer/tokenizer (1.2.3) - Locking tysonandre/var_representation_polyfill (0.1.3) - Locking webmozart/assert (1.11.0) - Locking wikimedia/alea (1.0.0) - Locking wikimedia/assert (v0.5.1) - Locking wikimedia/at-ease (v3.0.0) - Locking wikimedia/base-convert (v2.0.2) - Locking wikimedia/bcp-47-code (v2.0.1) - Locking wikimedia/cdb (3.0.0) - Locking wikimedia/cldr-plural-rule-parser (v2.0.0) - Locking wikimedia/codex (v0.7.1) - Locking wikimedia/common-passwords (v0.5.1) - Locking wikimedia/composer-merge-plugin (v2.1.0) - Locking wikimedia/cssjanus (v2.3.0) - Locking wikimedia/html-formatter (4.1.0) - Locking wikimedia/idle-dom (v2.1.0) - Locking wikimedia/ip-utils (5.0.0) - Locking wikimedia/json-codec (v4.0.0) - Locking wikimedia/langconv (0.5.0) - Locking wikimedia/less.php (v5.2.1) - Locking wikimedia/minify (2.9.0) - Locking wikimedia/normalized-exception (v2.1.1) - Locking wikimedia/object-factory (v5.0.1) - Locking wikimedia/parsoid (v0.22.0-a26) - Locking wikimedia/php-session-serializer (v3.0.2) - Locking wikimedia/purtle (v2.0.0) - Locking wikimedia/relpath (4.0.2) - Locking wikimedia/remex-html (5.1.0) - Locking wikimedia/request-timeout (v3.0.0) - Locking wikimedia/running-stat (v2.1.0) - Locking wikimedia/scoped-callback (v5.0.0) - Locking wikimedia/services (4.0.0) - Locking wikimedia/shellbox (4.3.0) - Locking wikimedia/testing-access-wrapper (3.0.0) - Locking wikimedia/timestamp (v5.0.0) - Locking wikimedia/utfnormal (4.0.0) - Locking wikimedia/wait-condition-loop (v2.0.2) - Locking wikimedia/wikipeg (5.0.1) - Locking wikimedia/wrappedstring (v4.0.1) - Locking wikimedia/xmp-reader (0.10.1) - Locking wikimedia/zest-css (4.1.0) - Locking wmde/hamcrest-html-matchers (v1.1.0) - Locking zordius/lightncandy (v1.2.6) Writing lock file Installing dependencies from lock file (including require-dev) Package operations: 139 installs, 0 updates, 0 removals - Downloading wikimedia/composer-merge-plugin (v2.1.0) - Downloading doctrine/event-manager (2.0.1) - Downloading doctrine/dbal (3.10.0) - Downloading doctrine/sql-formatter (1.5.2) - Downloading johnkary/phpunit-speedtrap (v4.0.1) - Downloading oojs/oojs-ui (v0.53.0) - Downloading pear/pear_exception (v1.0.2) - Downloading pear/console_getopt (v1.4.3) - Downloading pear/pear-core-minimal (v1.10.16) - Downloading pear/mail (v2.0.0) - Downloading pear/mail_mime (1.10.12) - Downloading pear/net_socket (v1.2.2) - Downloading pear/net_smtp (1.12.1) - Downloading psy/psysh (v0.12.12) - Downloading symfony/yaml (v6.4.25) - Downloading wikimedia/cldr-plural-rule-parser (v2.0.0) - Downloading wikimedia/common-passwords (v0.5.1) - Downloading wikimedia/cssjanus (v2.3.0) - Downloading wikimedia/html-formatter (4.1.0) - Downloading wikimedia/langconv (0.5.0) - Downloading wikimedia/less.php (v5.2.1) - Downloading wikimedia/minify (2.9.0) - Downloading wikimedia/wikipeg (5.0.1) - Downloading wikimedia/parsoid (v0.22.0-a26) - Downloading wikimedia/php-session-serializer (v3.0.2) - Downloading wikimedia/relpath (4.0.2) - Downloading wikimedia/request-timeout (v3.0.0) - Downloading wikimedia/running-stat (v2.1.0) - Downloading monolog/monolog (2.9.3) - Downloading wikimedia/shellbox (4.3.0) - Downloading wikimedia/wait-condition-loop (v2.0.2) - Downloading wikimedia/wrappedstring (v4.0.1) - Downloading wikimedia/xmp-reader (0.10.1) - Downloading wmde/hamcrest-html-matchers (v1.1.0) 0/34 [>---------------------------] 0% 14/34 [===========>----------------] 41% 18/34 [==============>-------------] 52% 26/34 [=====================>------] 76% 30/34 [========================>---] 88% 32/34 [==========================>-] 94% 33/34 [===========================>] 97% 34/34 [============================] 100% - Installing wikimedia/composer-merge-plugin (v2.1.0): Extracting archive - Installing squizlabs/php_codesniffer (3.13.2): Extracting archive - Installing dealerdirect/phpcodesniffer-composer-installer (v1.1.2): Extracting archive - Installing composer/pcre (3.3.2): Extracting archive - Installing psr/log (1.1.4): Extracting archive - Installing psr/cache (3.0.0): Extracting archive - Installing doctrine/event-manager (2.0.1): Extracting archive - Installing doctrine/deprecations (1.1.5): Extracting archive - Installing doctrine/dbal (3.10.0): Extracting archive - Installing doctrine/sql-formatter (1.5.2): Extracting archive - Installing giorgiosironi/eris (0.14.1): Extracting archive - Installing guzzlehttp/promises (2.3.0): Extracting archive - Installing sebastian/version (3.0.2): Extracting archive - Installing sebastian/type (3.2.1): Extracting archive - Installing sebastian/resource-operations (3.0.4): Extracting archive - Installing sebastian/recursion-context (4.0.6): Extracting archive - Installing sebastian/object-reflector (2.0.4): Extracting archive - Installing sebastian/object-enumerator (4.0.4): Extracting archive - Installing sebastian/global-state (5.0.8): Extracting archive - Installing sebastian/exporter (4.0.8): Extracting archive - Installing sebastian/environment (5.1.5): Extracting archive - Installing sebastian/diff (4.0.6): Extracting archive - Installing sebastian/comparator (4.0.9): Extracting archive - Installing sebastian/code-unit (1.0.8): Extracting archive - Installing sebastian/cli-parser (1.0.2): Extracting archive - Installing phpunit/php-timer (5.0.3): Extracting archive - Installing phpunit/php-text-template (2.0.4): Extracting archive - Installing phpunit/php-invoker (3.1.1): Extracting archive - Installing phpunit/php-file-iterator (3.0.6): Extracting archive - Installing theseer/tokenizer (1.2.3): Extracting archive - Installing nikic/php-parser (v5.6.1): Extracting archive - Installing sebastian/lines-of-code (1.0.4): Extracting archive - Installing sebastian/complexity (2.0.3): Extracting archive - Installing sebastian/code-unit-reverse-lookup (2.0.3): Extracting archive - Installing phpunit/php-code-coverage (9.2.32): Extracting archive - Installing phar-io/version (3.2.1): Extracting archive - Installing phar-io/manifest (2.0.4): Extracting archive - Installing myclabs/deep-copy (1.13.4): Extracting archive - Installing doctrine/instantiator (2.0.0): Extracting archive - Installing phpunit/phpunit (9.6.21): Extracting archive - Installing johnkary/phpunit-speedtrap (v4.0.1): Extracting archive - Installing psr/clock (1.0.0): Extracting archive - Installing stella-maris/clock (0.1.7): Extracting archive - Installing lcobucci/clock (2.2.0): Extracting archive - Installing lcobucci/jwt (4.1.5): Extracting archive - Installing mck89/peast (v1.17.2): Extracting archive - Installing phpcsstandards/phpcsutils (1.1.1): Extracting archive - Installing phpcsstandards/phpcsextra (1.4.0): Extracting archive - Installing composer/spdx-licenses (1.5.9): Extracting archive - Installing composer/semver (3.4.4): Extracting archive - Installing mediawiki/mediawiki-codesniffer (v48.0.0): Extracting archive - Installing tysonandre/var_representation_polyfill (0.1.3): Extracting archive - Installing symfony/string (v7.3.4): Extracting archive - Installing symfony/deprecation-contracts (v3.6.0): Extracting archive - Installing psr/container (2.0.2): Extracting archive - Installing symfony/service-contracts (v3.6.0): Extracting archive - Installing symfony/console (v7.3.4): Extracting archive - Installing sabre/event (5.1.7): Extracting archive - Installing netresearch/jsonmapper (v4.5.0): Extracting archive - Installing microsoft/tolerant-php-parser (v0.1.2): Extracting archive - Installing webmozart/assert (1.11.0): Extracting archive - Installing phpstan/phpdoc-parser (2.3.0): Extracting archive - Installing phpdocumentor/reflection-common (2.2.0): Extracting archive - Installing phpdocumentor/type-resolver (1.10.0): Extracting archive - Installing phpdocumentor/reflection-docblock (5.6.3): Extracting archive - Installing felixfbecker/advanced-json-rpc (v3.2.1): Extracting archive - Installing composer/xdebug-handler (3.0.5): Extracting archive - Installing phan/phan (5.5.1): Extracting archive - Installing mediawiki/phan-taint-check-plugin (7.0.0): Extracting archive - Installing mediawiki/mediawiki-phan-config (0.17.0): Extracting archive - Installing mediawiki/minus-x (1.1.3): Extracting archive - Installing oojs/oojs-ui (v0.53.0): Extracting archive - Installing pear/pear_exception (v1.0.2): Extracting archive - Installing pear/console_getopt (v1.4.3): Extracting archive - Installing pear/pear-core-minimal (v1.10.16): Extracting archive - Installing pear/mail (v2.0.0): Extracting archive - Installing pear/mail_mime (1.10.12): Extracting archive - Installing pear/net_socket (v1.2.2): Extracting archive - Installing pear/net_smtp (1.12.1): Extracting archive - Installing php-parallel-lint/php-console-color (v1.0.1): Extracting archive - Installing php-parallel-lint/php-console-highlighter (v1.0.0): Extracting archive - Installing php-parallel-lint/php-parallel-lint (v1.4.0): Extracting archive - Installing psr/http-message (1.1): Extracting archive - Installing psr/http-client (1.0.3): Extracting archive - Installing psr/http-factory (1.1.0): Extracting archive - Installing symfony/var-dumper (v7.3.4): Extracting archive - Installing psy/psysh (v0.12.12): Extracting archive - Installing ralouphie/getallheaders (3.0.3): Extracting archive - Installing seld/jsonlint (1.11.0): Extracting archive - Installing symfony/yaml (v6.4.25): Extracting archive - Installing wikimedia/alea (1.0.0): Extracting archive - Installing wikimedia/at-ease (v3.0.0): Extracting archive - Installing wikimedia/cdb (3.0.0): Extracting archive - Installing wikimedia/cldr-plural-rule-parser (v2.0.0): Extracting archive - Installing zordius/lightncandy (v1.2.6): Extracting archive - Installing wikimedia/scoped-callback (v5.0.0): Extracting archive - Installing wikimedia/services (4.0.0): Extracting archive - Installing guzzlehttp/psr7 (2.8.0): Extracting archive - Installing wikimedia/codex (v0.7.1): Extracting archive - Installing wikimedia/common-passwords (v0.5.1): Extracting archive - Installing wikimedia/cssjanus (v2.3.0): Extracting archive - Installing wikimedia/html-formatter (4.1.0): Extracting archive - Installing wikimedia/assert (v0.5.1): Extracting archive - Installing wikimedia/langconv (0.5.0): Extracting archive - Installing wikimedia/less.php (v5.2.1): Extracting archive - Installing pear/net_url2 (v2.2.3): Extracting archive - Installing wikimedia/minify (2.9.0): Extracting archive - Installing wikimedia/zest-css (4.1.0): Extracting archive - Installing wikimedia/wikipeg (5.0.1): Extracting archive - Installing wikimedia/utfnormal (4.0.0): Extracting archive - Installing wikimedia/remex-html (5.1.0): Extracting archive - Installing wikimedia/object-factory (v5.0.1): Extracting archive - Installing wikimedia/json-codec (v4.0.0): Extracting archive - Installing wikimedia/base-convert (v2.0.2): Extracting archive - Installing wikimedia/ip-utils (5.0.0): Extracting archive - Installing wikimedia/idle-dom (v2.1.0): Extracting archive - Installing wikimedia/bcp-47-code (v2.0.1): Extracting archive - Installing symfony/polyfill-php84 (v1.33.0): Extracting archive - Installing symfony/polyfill-php83 (v1.33.0): Extracting archive - Installing symfony/polyfill-php82 (v1.33.0): Extracting archive - Installing liuggio/statsd-php-client (v1.0.18): Extracting archive - Installing justinrainbow/json-schema (5.3.0): Extracting archive - Installing wikimedia/parsoid (v0.22.0-a26): Extracting archive - Installing wikimedia/php-session-serializer (v3.0.2): Extracting archive - Installing wikimedia/purtle (v2.0.0): Extracting archive - Installing wikimedia/relpath (4.0.2): Extracting archive - Installing wikimedia/normalized-exception (v2.1.1): Extracting archive - Installing wikimedia/request-timeout (v3.0.0): Extracting archive - Installing wikimedia/running-stat (v2.1.0): Extracting archive - Installing monolog/monolog (2.9.3): Extracting archive - Installing guzzlehttp/guzzle (7.10.0): Extracting archive - Installing wikimedia/shellbox (4.3.0): Extracting archive - Installing wikimedia/testing-access-wrapper (3.0.0): Extracting archive - Installing wikimedia/wait-condition-loop (v2.0.2): Extracting archive - Installing wikimedia/wrappedstring (v4.0.1): Extracting archive - Installing wikimedia/timestamp (v5.0.0): Extracting archive - Installing wikimedia/xmp-reader (0.10.1): Extracting archive - Installing hamcrest/hamcrest-php (v2.1.1): Extracting archive - Installing wmde/hamcrest-html-matchers (v1.1.0): Extracting archive 0/136 [>---------------------------] 0% 29/136 [=====>----------------------] 21% 45/136 [=========>------------------] 33% 63/136 [============>---------------] 46% 76/136 [===============>------------] 55% 91/136 [==================>---------] 66% 101/136 [====================>-------] 74% 116/136 [=======================>----] 85% 124/136 [=========================>--] 91% 136/136 [============================] 100% 27 package suggestions were added by new dependencies, use `composer suggest` to see details. Generating optimized autoload files 52 packages you are using are looking for funding. Use the `composer fund` command to find out more! > MediaWiki\Composer\ComposerVendorHtaccessCreator::onEvent --- stdout --- PHP CodeSniffer Config installed_paths set to ../../mediawiki/mediawiki-codesniffer,../../phpcsstandards/phpcsextra,../../phpcsstandards/phpcsutils --- end --- $ /usr/bin/npm audit --json --- stdout --- { "auditReportVersion": 2, "vulnerabilities": { "axios": { "name": "axios", "severity": "high", "isDirect": false, "via": [ { "source": 1097679, "name": "axios", "dependency": "axios", "title": "Axios Cross-Site Request Forgery Vulnerability", "url": "https://github.com/advisories/GHSA-wf5p-g6vw-rhxx", "severity": "moderate", "cwe": [ "CWE-352" ], "cvss": { "score": 6.5, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N" }, "range": ">=0.8.1 <0.28.0" }, { "source": 1103617, "name": "axios", "dependency": "axios", "title": "axios Requests Vulnerable To Possible SSRF and Credential Leakage via Absolute URL", "url": "https://github.com/advisories/GHSA-jr5f-v2jv-69x6", "severity": "high", "cwe": [ "CWE-918" ], "cvss": { "score": 0, "vectorString": null }, "range": "<0.30.0" }, { "source": 1108262, "name": "axios", "dependency": "axios", "title": "Axios is vulnerable to DoS attack through lack of data size check", "url": "https://github.com/advisories/GHSA-4hjh-wcwx-xvwj", "severity": "high", "cwe": [ "CWE-770" ], "cvss": { "score": 7.5, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H" }, "range": "<0.30.2" } ], "effects": [ "openapi-validator" ], "range": "<=0.30.1", "nodes": [ "node_modules/axios" ], "fixAvailable": { "name": "chai-openapi-response-validator", "version": "0.14.1", "isSemVerMajor": true } }, "chai-openapi-response-validator": { "name": "chai-openapi-response-validator", "severity": "high", "isDirect": true, "via": [ "openapi-validator" ], "effects": [], "range": "0.11.2 || >=0.14.2-alpha.0", "nodes": [ "node_modules/chai-openapi-response-validator" ], "fixAvailable": { "name": "chai-openapi-response-validator", "version": "0.14.1", "isSemVerMajor": true } }, "form-data": { "name": "form-data", "severity": "critical", "isDirect": false, "via": [ { "source": 1106509, "name": "form-data", "dependency": "form-data", "title": "form-data uses unsafe random function in form-data for choosing boundary", "url": "https://github.com/advisories/GHSA-fjxv-7rqg-78g4", "severity": "critical", "cwe": [ "CWE-330" ], "cvss": { "score": 0, "vectorString": null }, "range": "<2.5.4" } ], "effects": [ "request" ], "range": "<2.5.4", "nodes": [ "node_modules/request/node_modules/form-data" ], "fixAvailable": { "name": "mwbot", "version": "0.1.5", "isSemVerMajor": true } }, "mwbot": { "name": "mwbot", "severity": "moderate", "isDirect": false, "via": [ "request" ], "effects": [], "range": ">=0.1.6", "nodes": [ "node_modules/mwbot" ], "fixAvailable": { "name": "mwbot", "version": "0.1.5", "isSemVerMajor": true } }, "openapi-validator": { "name": "openapi-validator", "severity": "high", "isDirect": false, "via": [ "axios" ], "effects": [ "chai-openapi-response-validator" ], "range": ">=0.14.2-alpha.0", "nodes": [ "node_modules/openapi-validator" ], "fixAvailable": { "name": "chai-openapi-response-validator", "version": "0.14.1", "isSemVerMajor": true } }, "request": { "name": "request", "severity": "critical", "isDirect": false, "via": [ { "source": 1096727, "name": "request", "dependency": "request", "title": "Server-Side Request Forgery in Request", "url": "https://github.com/advisories/GHSA-p8p7-x288-28g6", "severity": "moderate", "cwe": [ "CWE-918" ], "cvss": { "score": 6.1, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N" }, "range": "<=2.88.2" }, "form-data", "tough-cookie" ], "effects": [ "mwbot" ], "range": "*", "nodes": [ "node_modules/request" ], "fixAvailable": { "name": "mwbot", "version": "0.1.5", "isSemVerMajor": true } }, "tough-cookie": { "name": "tough-cookie", "severity": "moderate", "isDirect": false, "via": [ { "source": 1097682, "name": "tough-cookie", "dependency": "tough-cookie", "title": "tough-cookie Prototype Pollution vulnerability", "url": "https://github.com/advisories/GHSA-72xf-g2v4-qvf3", "severity": "moderate", "cwe": [ "CWE-1321" ], "cvss": { "score": 6.5, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N" }, "range": "<4.1.3" } ], "effects": [ "request" ], "range": "<4.1.3", "nodes": [ "node_modules/request/node_modules/tough-cookie" ], "fixAvailable": { "name": "mwbot", "version": "0.1.5", "isSemVerMajor": true } } }, "metadata": { "vulnerabilities": { "info": 0, "low": 0, "moderate": 2, "high": 3, "critical": 2, "total": 7 }, "dependencies": { "prod": 1, "dev": 1832, "optional": 38, "peer": 2, "peerOptional": 0, "total": 1832 } } } --- end --- Attempting to npm audit fix $ /usr/bin/npm audit fix --dry-run --only=dev --json --- stderr --- npm WARN invalid config only="dev" set in command line options npm WARN invalid config Must be one of: null, prod, production npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: '@wikimedia/codex@2.3.2', npm WARN EBADENGINE required: { node: '>=20.19.1', npm: '>=10.8.2' }, npm WARN EBADENGINE current: { node: 'v20.19.2', npm: '9.2.0' } npm WARN EBADENGINE } npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: '@wikimedia/codex-icons@2.3.2', npm WARN EBADENGINE required: { node: '>=20.19.1', npm: '>=10.8.2' }, npm WARN EBADENGINE current: { node: 'v20.19.2', npm: '9.2.0' } npm WARN EBADENGINE } --- stdout --- { "added": 1831, "removed": 0, "changed": 0, "audited": 1832, "funding": 236, "audit": { "auditReportVersion": 2, "vulnerabilities": { "axios": { "name": "axios", "severity": "high", "isDirect": false, "via": [ { "source": 1097679, "name": "axios", "dependency": "axios", "title": "Axios Cross-Site Request Forgery Vulnerability", "url": "https://github.com/advisories/GHSA-wf5p-g6vw-rhxx", "severity": "moderate", "cwe": [ "CWE-352" ], "cvss": { "score": 6.5, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N" }, "range": ">=0.8.1 <0.28.0" }, { "source": 1103617, "name": "axios", "dependency": "axios", "title": "axios Requests Vulnerable To Possible SSRF and Credential Leakage via Absolute URL", "url": "https://github.com/advisories/GHSA-jr5f-v2jv-69x6", "severity": "high", "cwe": [ "CWE-918" ], "cvss": { "score": 0, "vectorString": null }, "range": "<0.30.0" }, { "source": 1108262, "name": "axios", "dependency": "axios", "title": "Axios is vulnerable to DoS attack through lack of data size check", "url": "https://github.com/advisories/GHSA-4hjh-wcwx-xvwj", "severity": "high", "cwe": [ "CWE-770" ], "cvss": { "score": 7.5, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H" }, "range": "<0.30.2" } ], "effects": [ "openapi-validator" ], "range": "<=0.30.1", "nodes": [ "node_modules/axios" ], "fixAvailable": { "name": "chai-openapi-response-validator", "version": "0.14.1", "isSemVerMajor": true } }, "chai-openapi-response-validator": { "name": "chai-openapi-response-validator", "severity": "high", "isDirect": true, "via": [ "openapi-validator" ], "effects": [], "range": "0.11.2 || >=0.14.2-alpha.0", "nodes": [ "node_modules/chai-openapi-response-validator" ], "fixAvailable": { "name": "chai-openapi-response-validator", "version": "0.14.1", "isSemVerMajor": true } }, "form-data": { "name": "form-data", "severity": "critical", "isDirect": false, "via": [ { "source": 1106509, "name": "form-data", "dependency": "form-data", "title": "form-data uses unsafe random function in form-data for choosing boundary", "url": "https://github.com/advisories/GHSA-fjxv-7rqg-78g4", "severity": "critical", "cwe": [ "CWE-330" ], "cvss": { "score": 0, "vectorString": null }, "range": "<2.5.4" } ], "effects": [ "request" ], "range": "<2.5.4", "nodes": [ "node_modules/request/node_modules/form-data" ], "fixAvailable": { "name": "mwbot", "version": "0.1.5", "isSemVerMajor": true } }, "mwbot": { "name": "mwbot", "severity": "moderate", "isDirect": false, "via": [ "request" ], "effects": [], "range": ">=0.1.6", "nodes": [ "node_modules/mwbot" ], "fixAvailable": { "name": "mwbot", "version": "0.1.5", "isSemVerMajor": true } }, "openapi-validator": { "name": "openapi-validator", "severity": "high", "isDirect": false, "via": [ "axios" ], "effects": [ "chai-openapi-response-validator" ], "range": ">=0.14.2-alpha.0", "nodes": [ "node_modules/openapi-validator" ], "fixAvailable": { "name": "chai-openapi-response-validator", "version": "0.14.1", "isSemVerMajor": true } }, "request": { "name": "request", "severity": "critical", "isDirect": false, "via": [ { "source": 1096727, "name": "request", "dependency": "request", "title": "Server-Side Request Forgery in Request", "url": "https://github.com/advisories/GHSA-p8p7-x288-28g6", "severity": "moderate", "cwe": [ "CWE-918" ], "cvss": { "score": 6.1, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N" }, "range": "<=2.88.2" }, "form-data", "tough-cookie" ], "effects": [ "mwbot" ], "range": "*", "nodes": [ "node_modules/request" ], "fixAvailable": { "name": "mwbot", "version": "0.1.5", "isSemVerMajor": true } }, "tough-cookie": { "name": "tough-cookie", "severity": "moderate", "isDirect": false, "via": [ { "source": 1097682, "name": "tough-cookie", "dependency": "tough-cookie", "title": "tough-cookie Prototype Pollution vulnerability", "url": "https://github.com/advisories/GHSA-72xf-g2v4-qvf3", "severity": "moderate", "cwe": [ "CWE-1321" ], "cvss": { "score": 6.5, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N" }, "range": "<4.1.3" } ], "effects": [ "request" ], "range": "<4.1.3", "nodes": [ "node_modules/request/node_modules/tough-cookie" ], "fixAvailable": { "name": "mwbot", "version": "0.1.5", "isSemVerMajor": true } } }, "metadata": { "vulnerabilities": { "info": 0, "low": 0, "moderate": 2, "high": 3, "critical": 2, "total": 7 }, "dependencies": { "prod": 1, "dev": 1831, "optional": 38, "peer": 2, "peerOptional": 0, "total": 1831 } } } } --- end --- {"added": 1831, "removed": 0, "changed": 0, "audited": 1832, "funding": 236, "audit": {"auditReportVersion": 2, "vulnerabilities": {"axios": {"name": "axios", "severity": "high", "isDirect": false, "via": [{"source": 1097679, "name": "axios", "dependency": "axios", "title": "Axios Cross-Site Request Forgery Vulnerability", "url": "https://github.com/advisories/GHSA-wf5p-g6vw-rhxx", "severity": "moderate", "cwe": ["CWE-352"], "cvss": {"score": 6.5, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N"}, "range": ">=0.8.1 <0.28.0"}, {"source": 1103617, "name": "axios", "dependency": "axios", "title": "axios Requests Vulnerable To Possible SSRF and Credential Leakage via Absolute URL", "url": "https://github.com/advisories/GHSA-jr5f-v2jv-69x6", "severity": "high", "cwe": ["CWE-918"], "cvss": {"score": 0, "vectorString": null}, "range": "<0.30.0"}, {"source": 1108262, "name": "axios", "dependency": "axios", "title": "Axios is vulnerable to DoS attack through lack of data size check", "url": "https://github.com/advisories/GHSA-4hjh-wcwx-xvwj", "severity": "high", "cwe": ["CWE-770"], "cvss": {"score": 7.5, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"}, "range": "<0.30.2"}], "effects": ["openapi-validator"], "range": "<=0.30.1", "nodes": ["node_modules/axios"], "fixAvailable": {"name": "chai-openapi-response-validator", "version": "0.14.1", "isSemVerMajor": true}}, "chai-openapi-response-validator": {"name": "chai-openapi-response-validator", "severity": "high", "isDirect": true, "via": ["openapi-validator"], "effects": [], "range": "0.11.2 || >=0.14.2-alpha.0", "nodes": ["node_modules/chai-openapi-response-validator"], "fixAvailable": {"name": "chai-openapi-response-validator", "version": "0.14.1", "isSemVerMajor": true}}, "form-data": {"name": "form-data", "severity": "critical", "isDirect": false, "via": [{"source": 1106509, "name": "form-data", "dependency": "form-data", "title": "form-data uses unsafe random function in form-data for choosing boundary", "url": "https://github.com/advisories/GHSA-fjxv-7rqg-78g4", "severity": "critical", "cwe": ["CWE-330"], "cvss": {"score": 0, "vectorString": null}, "range": "<2.5.4"}], "effects": ["request"], "range": "<2.5.4", "nodes": ["node_modules/request/node_modules/form-data"], "fixAvailable": {"name": "mwbot", "version": "0.1.5", "isSemVerMajor": true}}, "mwbot": {"name": "mwbot", "severity": "moderate", "isDirect": false, "via": ["request"], "effects": [], "range": ">=0.1.6", "nodes": ["node_modules/mwbot"], "fixAvailable": {"name": "mwbot", "version": "0.1.5", "isSemVerMajor": true}}, "openapi-validator": {"name": "openapi-validator", "severity": "high", "isDirect": false, "via": ["axios"], "effects": ["chai-openapi-response-validator"], "range": ">=0.14.2-alpha.0", "nodes": ["node_modules/openapi-validator"], "fixAvailable": {"name": "chai-openapi-response-validator", "version": "0.14.1", "isSemVerMajor": true}}, "request": {"name": "request", "severity": "critical", "isDirect": false, "via": [{"source": 1096727, "name": "request", "dependency": "request", "title": "Server-Side Request Forgery in Request", "url": "https://github.com/advisories/GHSA-p8p7-x288-28g6", "severity": "moderate", "cwe": ["CWE-918"], "cvss": {"score": 6.1, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"}, "range": "<=2.88.2"}, "form-data", "tough-cookie"], "effects": ["mwbot"], "range": "*", "nodes": ["node_modules/request"], "fixAvailable": {"name": "mwbot", "version": "0.1.5", "isSemVerMajor": true}}, "tough-cookie": {"name": "tough-cookie", "severity": "moderate", "isDirect": false, "via": [{"source": 1097682, "name": "tough-cookie", "dependency": "tough-cookie", "title": "tough-cookie Prototype Pollution vulnerability", "url": "https://github.com/advisories/GHSA-72xf-g2v4-qvf3", "severity": "moderate", "cwe": ["CWE-1321"], "cvss": {"score": 6.5, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N"}, "range": "<4.1.3"}], "effects": ["request"], "range": "<4.1.3", "nodes": ["node_modules/request/node_modules/tough-cookie"], "fixAvailable": {"name": "mwbot", "version": "0.1.5", "isSemVerMajor": true}}}, "metadata": {"vulnerabilities": {"info": 0, "low": 0, "moderate": 2, "high": 3, "critical": 2, "total": 7}, "dependencies": {"prod": 1, "dev": 1831, "optional": 38, "peer": 2, "peerOptional": 0, "total": 1831}}}} $ /usr/bin/npm audit fix --only=dev --- stderr --- npm WARN invalid config only="dev" set in command line options npm WARN invalid config Must be one of: null, prod, production npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: '@wikimedia/codex@2.3.2', npm WARN EBADENGINE required: { node: '>=20.19.1', npm: '>=10.8.2' }, npm WARN EBADENGINE current: { node: 'v20.19.2', npm: '9.2.0' } npm WARN EBADENGINE } npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: '@wikimedia/codex-icons@2.3.2', npm WARN EBADENGINE required: { node: '>=20.19.1', npm: '>=10.8.2' }, npm WARN EBADENGINE current: { node: 'v20.19.2', npm: '9.2.0' } npm WARN EBADENGINE } npm WARN deprecated osenv@0.1.5: This package is no longer supported. npm WARN deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. npm WARN deprecated har-validator@5.1.5: this library is no longer supported npm WARN deprecated @humanwhocodes/config-array@0.13.0: Use @eslint/config-array instead npm WARN deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported npm WARN deprecated abab@2.0.6: Use your platform's native atob() and btoa() methods instead npm WARN deprecated supertest@7.1.0: Please upgrade to supertest v7.1.3+, see release notes at https://github.com/forwardemail/supertest/releases/tag/v7.1.3 - maintenance is supported by Forward Email @ https://forwardemail.net npm WARN deprecated @humanwhocodes/object-schema@2.0.3: Use @eslint/object-schema instead npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported npm WARN deprecated glob@8.1.0: Glob versions prior to v9 are no longer supported npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported npm WARN deprecated glob@7.1.7: Glob versions prior to v9 are no longer supported npm WARN deprecated glob@7.1.7: Glob versions prior to v9 are no longer supported npm WARN deprecated domexception@4.0.0: Use your platform's native DOMException instead npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated node-domexception@1.0.0: Use your platform's native DOMException instead npm WARN deprecated superagent@9.0.2: Please upgrade to superagent v10.2.2+, see release notes at https://github.com/forwardemail/superagent/releases/tag/v10.2.2 - maintenance is supported by Forward Email @ https://forwardemail.net npm WARN deprecated eslint@8.57.1: This version is no longer supported. Please see https://eslint.org/version-support for other options. --- stdout --- added 1805 packages, and audited 1806 packages in 35s 236 packages are looking for funding run `npm fund` for details # npm audit report axios <=0.30.1 Severity: high Axios Cross-Site Request Forgery Vulnerability - https://github.com/advisories/GHSA-wf5p-g6vw-rhxx axios Requests Vulnerable To Possible SSRF and Credential Leakage via Absolute URL - https://github.com/advisories/GHSA-jr5f-v2jv-69x6 Axios is vulnerable to DoS attack through lack of data size check - https://github.com/advisories/GHSA-4hjh-wcwx-xvwj fix available via `npm audit fix --force` Will install chai-openapi-response-validator@0.14.1, which is a breaking change node_modules/axios openapi-validator >=0.14.2-alpha.0 Depends on vulnerable versions of axios node_modules/openapi-validator chai-openapi-response-validator 0.11.2 || >=0.14.2-alpha.0 Depends on vulnerable versions of openapi-validator node_modules/chai-openapi-response-validator form-data <2.5.4 Severity: critical form-data uses unsafe random function in form-data for choosing boundary - https://github.com/advisories/GHSA-fjxv-7rqg-78g4 No fix available node_modules/request/node_modules/form-data request * Depends on vulnerable versions of form-data Depends on vulnerable versions of tough-cookie node_modules/request mwbot >=0.1.6 Depends on vulnerable versions of request node_modules/mwbot wdio-mediawiki * Depends on vulnerable versions of mwbot node_modules/wdio-mediawiki tough-cookie <4.1.3 Severity: moderate tough-cookie Prototype Pollution vulnerability - https://github.com/advisories/GHSA-72xf-g2v4-qvf3 No fix available node_modules/request/node_modules/tough-cookie 8 vulnerabilities (3 moderate, 3 high, 2 critical) To address all issues possible (including breaking changes), run: npm audit fix --force Some issues need review, and may require choosing a different dependency. --- end --- Verifying that tests still pass $ /usr/bin/npm ci --- stderr --- npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: '@wikimedia/codex@2.3.2', npm WARN EBADENGINE required: { node: '>=20.19.1', npm: '>=10.8.2' }, npm WARN EBADENGINE current: { node: 'v20.19.2', npm: '9.2.0' } npm WARN EBADENGINE } npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: '@wikimedia/codex-icons@2.3.2', npm WARN EBADENGINE required: { node: '>=20.19.1', npm: '>=10.8.2' }, npm WARN EBADENGINE current: { node: 'v20.19.2', npm: '9.2.0' } npm WARN EBADENGINE } npm WARN deprecated osenv@0.1.5: This package is no longer supported. npm WARN deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. npm WARN deprecated har-validator@5.1.5: this library is no longer supported npm WARN deprecated @humanwhocodes/config-array@0.13.0: Use @eslint/config-array instead npm WARN deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported npm WARN deprecated abab@2.0.6: Use your platform's native atob() and btoa() methods instead npm WARN deprecated supertest@7.1.0: Please upgrade to supertest v7.1.3+, see release notes at https://github.com/forwardemail/supertest/releases/tag/v7.1.3 - maintenance is supported by Forward Email @ https://forwardemail.net npm WARN deprecated @humanwhocodes/object-schema@2.0.3: Use @eslint/object-schema instead npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported npm WARN deprecated glob@8.1.0: Glob versions prior to v9 are no longer supported npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported npm WARN deprecated glob@7.1.7: Glob versions prior to v9 are no longer supported npm WARN deprecated glob@7.1.7: Glob versions prior to v9 are no longer supported npm WARN deprecated domexception@4.0.0: Use your platform's native DOMException instead npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated node-domexception@1.0.0: Use your platform's native DOMException instead npm WARN deprecated superagent@9.0.2: Please upgrade to superagent v10.2.2+, see release notes at https://github.com/forwardemail/superagent/releases/tag/v10.2.2 - maintenance is supported by Forward Email @ https://forwardemail.net npm WARN deprecated eslint@8.57.1: This version is no longer supported. Please see https://eslint.org/version-support for other options. --- stdout --- added 1805 packages, and audited 1806 packages in 51s 236 packages are looking for funding run `npm fund` for details 8 vulnerabilities (3 moderate, 3 high, 2 critical) To address all issues possible (including breaking changes), run: npm audit fix --force Some issues need review, and may require choosing a different dependency. Run `npm audit` for details. --- end --- $ /usr/bin/npm test --- stderr --- PASS tests/jest/mediawiki.special.block/stores/block.test.js PASS tests/jest/mediawiki.special.block/BlockLog.test.js PASS tests/jest/mediawiki.skinning.typeaheadSearch/restSearchClient.test.js PASS tests/jest/mediawiki.special.block/UserLookup.test.js PASS tests/jest/mediawiki.special.block/util.test.js PASS tests/jest/mediawiki.skinning.typeaheadSearch/fetch.test.js PASS tests/jest/mediawiki.special.block/ExpiryField.test.js PASS tests/jest/mediawiki.special.block/NamespacesField.test.js PASS tests/jest/mediawiki.skinning.typeaheadSearch/instrumentation.test.js PASS tests/jest/mediawiki.skinning.typeaheadSearch/App.test.js PASS tests/jest/mediawiki.special.block/ReasonField.test.js PASS tests/jest/mediawiki.special.block/BlockDetailsField.test.js PASS tests/jest/mediawiki.special.block/init.test.js PASS tests/jest/mediawiki.special.block/AdditionalDetailsField.test.js PASS tests/jest/mediawiki.skinning.typeaheadSearch/urlGenerator.test.js PASS tests/jest/mediawiki.special.block/SpecialBlock.test.js (15.484 s) Jest: "/src/repo/resources/src/mediawiki.special.block/util.js" coverage threshold for lines (63%) not met: 62.5% Test Suites: 16 passed, 16 total Tests: 104 passed, 104 total Snapshots: 3 passed, 3 total Time: 23.513 s Ran all test suites. --- stdout --- > test > grunt lint && npm run doc && npm run jest Running "eslint:all" (eslint) task /src/repo/resources/src/jquery/jquery.makeCollapsible.js 441:1 warning Syntax error in namepath: ~'wikipage.collapsibleContent' jsdoc/valid-types /src/repo/resources/src/mediawiki.action.edit/edit.js 12:1 warning Syntax error in namepath: ~'wikipage.editform' jsdoc/valid-types /src/repo/resources/src/mediawiki.action/mediawiki.action.view.postEdit.js 21:1 warning Syntax error in namepath: ~'postEdit' jsdoc/valid-types 36:1 warning Syntax error in namepath: ~'postEdit.afterRemoval' jsdoc/valid-types /src/repo/resources/src/mediawiki.authenticationPopup/index.js 38:1 warning The type 'userinfo' is undefined jsdoc/no-undefined-types /src/repo/resources/src/mediawiki.base/errorLogger.js 8:1 warning Syntax error in namepath: ~'global.error' jsdoc/valid-types 22:1 warning Syntax error in namepath: ~'error.caught' jsdoc/valid-types /src/repo/resources/src/mediawiki.base/log.js 14:1 warning Found more than one @return declaration jsdoc/require-returns 14:1 warning Found more than one @return declaration jsdoc/require-returns-check /src/repo/resources/src/mediawiki.base/mediawiki.base.js 224:1 warning The type 'mediawiki' is undefined jsdoc/no-undefined-types 250:1 warning The type 'mediawiki' is undefined jsdoc/no-undefined-types /src/repo/resources/src/mediawiki.diff/inlineFormatToggle.js 150:1 warning Syntax error in namepath: ~'wikipage.diff.wikitextDiffBody' jsdoc/valid-types 162:1 warning Syntax error in namepath: ~'wikipage.diff.diffTypeSwitch' jsdoc/valid-types /src/repo/resources/src/mediawiki.editRecovery/edit.js 184:1 warning Syntax error in namepath: ~'editRecovery.loadEnd' jsdoc/valid-types /src/repo/resources/src/mediawiki.htmlform/cond-state.js 48:1 warning Found more than one @return declaration jsdoc/require-returns-check /src/repo/resources/src/mediawiki.htmlform/htmlform.js 5:1 warning Syntax error in namepath: ~'htmlform.enhance' jsdoc/valid-types /src/repo/resources/src/mediawiki.inspect.js 61:1 warning The type 'mediawiki' is undefined jsdoc/no-undefined-types 91:1 warning The type 'mediawiki' is undefined jsdoc/no-undefined-types 112:2 warning Found more than one @return declaration jsdoc/require-returns 112:2 warning Found more than one @return declaration jsdoc/require-returns-check 121:1 warning The type 'mediawiki' is undefined jsdoc/no-undefined-types 152:1 warning The type 'mediawiki' is undefined jsdoc/no-undefined-types 164:1 warning The type 'mediawiki' is undefined jsdoc/no-undefined-types 175:1 warning The type 'mediawiki' is undefined jsdoc/no-undefined-types 203:1 warning The type 'mediawiki' is undefined jsdoc/no-undefined-types /src/repo/resources/src/mediawiki.jqueryMsg/mediawiki.jqueryMsg.js 142:1 warning Found more than one @return declaration jsdoc/require-returns 142:1 warning Found more than one @return declaration jsdoc/require-returns-check /src/repo/resources/src/mediawiki.language.months/months.js 44:1 warning The type 'Months' is undefined jsdoc/no-undefined-types /src/repo/resources/src/mediawiki.notification.convertmessagebox.js 13:1 warning Syntax error in namepath: (require("mediawiki.notification.convertmessagebox")) jsdoc/valid-types /src/repo/resources/src/mediawiki.notification/notification.js 20:1 warning Missing JSDoc @param "message" type jsdoc/require-param-type 21:1 warning Missing JSDoc @param "options" type jsdoc/require-param-type /src/repo/resources/src/mediawiki.page.preview.js 416:1 warning Syntax error in namepath: ~'wikipage.tableOfContents' jsdoc/valid-types /src/repo/resources/src/mediawiki.page.ready/enableSearchDialog.js 19:21 warning Found non-literal argument in require security/detect-non-literal-require /src/repo/resources/src/mediawiki.page.ready/ready.js 98:1 warning Syntax error in namepath: ~'wikipage.indicators' jsdoc/valid-types 118:1 warning Syntax error in namepath: ~'wikipage.content' jsdoc/valid-types 139:1 warning Syntax error in namepath: ~'wikipage.categories' jsdoc/valid-types 155:1 warning Syntax error in namepath: ~'wikipage.diff' jsdoc/valid-types 186:1 warning Syntax error in namepath: ~'skin.logout' jsdoc/valid-types 295:21 warning Found non-literal argument in require security/detect-non-literal-require /src/repo/resources/src/mediawiki.page.watch.ajax/watch-ajax.js 128:1 warning Syntax error in namepath: ~'wikipage.watchlistChange' jsdoc/valid-types /src/repo/resources/src/mediawiki.rcfilters/Controller.js 330:1 warning Found more than one @return declaration jsdoc/require-returns 330:1 warning Found more than one @return declaration jsdoc/require-returns-check 550:1 warning Syntax error in namepath: ~'RcFilters.highlight.enable' jsdoc/valid-types /src/repo/resources/src/mediawiki.rcfilters/dm/FilterItem.js 81:1 warning Found more than one @return declaration jsdoc/require-returns 81:1 warning Found more than one @return declaration jsdoc/require-returns-check 335:1 warning The type 'update' is undefined jsdoc/no-undefined-types 351:1 warning The type 'update' is undefined jsdoc/no-undefined-types 366:1 warning The type 'update' is undefined jsdoc/no-undefined-types /src/repo/resources/src/mediawiki.rcfilters/dm/FiltersViewModel.js 1185:1 warning The type 'searchChange' is undefined jsdoc/no-undefined-types /src/repo/resources/src/mediawiki.rcfilters/mw.rcfilters.js 176:1 warning Syntax error in namepath: ~'structuredChangeFilters.ui.initialized' jsdoc/valid-types /src/repo/resources/src/mediawiki.rcfilters/ui/FilterTagMultiselectWidget.js 408:1 warning Syntax error in namepath: ~'RcFilters.popup.open' jsdoc/valid-types /src/repo/resources/src/mediawiki.searchSuggest/searchSuggest.js 36:1 warning The type 'ResponseMetaData' is undefined jsdoc/no-undefined-types 43:1 warning The type 'ResponseFunction' is undefined jsdoc/no-undefined-types /src/repo/resources/src/mediawiki.skinning.typeaheadSearch/App.vue 76:3 warning Prop 'router' requires default value to be set vue/require-default-prop 225:1 warning The type 'AbortableSearchFetch' is undefined jsdoc/no-undefined-types 309:1 warning The type 'SearchSubmitEvent' is undefined jsdoc/no-undefined-types /src/repo/resources/src/mediawiki.skinning.typeaheadSearch/fetch.js 21:1 warning The type 'RequestInit' is undefined jsdoc/no-undefined-types /src/repo/resources/src/mediawiki.skinning.typeaheadSearch/instrumentation.js 2:1 warning The type 'FetchEndEvent' is undefined jsdoc/no-undefined-types 16:1 warning The type 'SuggestionClickEvent' is undefined jsdoc/no-undefined-types 16:1 warning The type 'SearchSubmitEvent' is undefined jsdoc/no-undefined-types /src/repo/resources/src/mediawiki.skinning.typeaheadSearch/restSearchClient.js 4:1 warning Syntax error in type: import('./urlGenerator.js').UrlGenerator jsdoc/valid-types 11:1 warning The type 'RestResult' is undefined jsdoc/no-undefined-types 17:1 warning The type 'SearchResult' is undefined jsdoc/no-undefined-types /src/repo/resources/src/mediawiki.skinning.typeaheadSearch/urlGenerator.js 2:1 warning The type 'Record' is undefined jsdoc/no-undefined-types 9:1 warning The type 'RestResult' is undefined jsdoc/no-undefined-types 9:1 warning The type 'SearchResult' is undefined jsdoc/no-undefined-types 29:1 warning The type 'RestResult' is undefined jsdoc/no-undefined-types 29:1 warning The type 'SearchResult' is undefined jsdoc/no-undefined-types /src/repo/resources/src/mediawiki.special.apisandbox/ApiSandboxLayout.js 44:1 warning Found more than one @return declaration jsdoc/require-returns 44:1 warning Found more than one @return declaration jsdoc/require-returns-check /src/repo/resources/src/mediawiki.special.block/init.js 26:1 warning Syntax error in namepath: ~'SpecialBlock.block' jsdoc/valid-types 36:1 warning Syntax error in namepath: ~'SpecialBlock.form' jsdoc/valid-types /src/repo/resources/src/mediawiki.template.js 26:1 warning The type 'TemplateRenderer' is undefined jsdoc/no-undefined-types 40:1 warning The type 'TemplateRenderFunction' is undefined jsdoc/no-undefined-types 45:1 warning The type 'TemplateCompileFunction' is undefined jsdoc/no-undefined-types 61:1 warning The type 'TemplateCompiler' is undefined jsdoc/no-undefined-types 88:1 warning The type 'TemplateCompiler' is undefined jsdoc/no-undefined-types 107:1 warning The type 'TemplateRenderer' is undefined jsdoc/no-undefined-types 125:1 warning The type 'TemplateRenderer' is undefined jsdoc/no-undefined-types 147:1 warning The type 'TemplateRenderer' is undefined jsdoc/no-undefined-types /src/repo/resources/src/mediawiki.util/util.js 626:1 warning Syntax error in namepath: ~'util.addPortlet' jsdoc/valid-types 795:1 warning Syntax error in namepath: ~'util.addPortletLink' jsdoc/valid-types /src/repo/resources/src/mediawiki.widgets.datetime/DateTimeFormatter.js 268:1 warning The type 'FieldSpecificationObject' is undefined jsdoc/no-undefined-types 632:1 warning The type 'CalendarGridData' is undefined jsdoc/no-undefined-types /src/repo/resources/src/mediawiki.widgets.datetime/DiscordianDateTimeFormatter.js 74:1 warning The type 'FieldSpecificationObject' is undefined jsdoc/no-undefined-types /src/repo/resources/src/mediawiki.widgets.datetime/ProlepticGregorianDateTimeFormatter.js 306:1 warning The type 'FieldSpecificationObject' is undefined jsdoc/no-undefined-types /src/repo/resources/src/mediawiki.widgets/mw.widgets.NamespaceInputWidget.js 50:1 warning The type 'DropdownOptions' is undefined jsdoc/no-undefined-types /src/repo/resources/src/startup/mediawiki.loader.js 61:1 warning Syntax error in namepath: ~'resourceloader.exception' jsdoc/valid-types /src/repo/tests/qunit/data/testrunner.js 112:2 warning Missing JSDoc @return declaration jsdoc/require-returns /src/repo/tests/qunit/resources/mediawiki.deflate.test.js 68:5 warning Unused eslint-disable directive (no problems were reported from 'qunit/no-async-in-loops') /src/repo/tests/selenium/specs/page.js 79:1 warning This line has a length of 103. Maximum allowed is 100 max-len /src/repo/tests/selenium/wdio-mediawiki/PrometheusFileReporter.js 158:3 warning Found writeFileSync from package "fs" with non literal argument at index 0 security/detect-non-literal-fs-filename 173:22 warning Found readdirSync from package "fs" with non literal argument at index 0 security/detect-non-literal-fs-filename 178:28 warning Found readFileSync from package "fs" with non literal argument at index 0 security/detect-non-literal-fs-filename 258:2 warning Found writeFileSync from package "fs" with non literal argument at index 0 security/detect-non-literal-fs-filename /src/repo/tests/selenium/wdio-mediawiki/Util.js 32:1 warning This line has a length of 103. Maximum allowed is 100 max-len /src/repo/tests/selenium/wdio-mediawiki/wdio-defaults.conf.js 101:1 warning This line has a length of 108. Maximum allowed is 100 max-len ✖ 97 problems (0 errors, 97 warnings) 0 errors and 1 warning potentially fixable with the `--fix` option. Running "banana:core" (banana) task >> 1 message directory checked. Running "banana:botpasswords" (banana) task >> 1 message directory checked. Running "banana:codex" (banana) task >> 1 message directory checked. Running "banana:datetime" (banana) task >> 1 message directory checked. Running "banana:exif" (banana) task >> 1 message directory checked. Running "banana:nontranslatable" (banana) task >> 1 message directory checked. Running "banana:interwiki" (banana) task >> 1 message directory checked. Running "banana:preferences" (banana) task >> 1 message directory checked. Running "banana:languageconverter" (banana) task >> 1 message directory checked. Running "banana:api" (banana) task >> 1 message directory checked. Running "banana:rest" (banana) task >> 1 message directory checked. Running "banana:installer" (banana) task >> 1 message directory checked. Running "banana:paramvalidator" (banana) task >> 1 message directory checked. Running "stylelint:resources" (stylelint) task >> resources/src/mediawiki.skinning/content.media-dark.less >> 31:1 ⚠ Unexpected browser feature "prefers-color-scheme" is not supported by Firefox 49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66, Chrome 49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75, Safari 10,11,12,10.1,11.1, Safari on iOS 10.0-10.2,10.3,11.0-11.2,11.3-11.4,12.0-12.1,12.2-12.5 plugin/no-unsupported-browser-features >> >> ⚠ 1 problem (0 errors, 1 warning) ⚠ 1 warning >> Linted 214 files without errors Running "stylelint:config" (stylelint) task >> Linted 1 files without errors Done. > doc > jsdoc -c jsdoc.json > jest > jest --config tests/jest/jest.config.js ------------------------------------|---------|----------|---------|---------|--------------------------------------------------------------------------------------------------------------------- File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s ------------------------------------|---------|----------|---------|---------|--------------------------------------------------------------------------------------------------------------------- All files | 92.26 | 89.37 | 77.77 | 92.26 | mediawiki.skinning.typeaheadSearch | 85.87 | 79.24 | 58.06 | 85.87 | App.vue | 76.41 | 69.23 | 16.66 | 76.41 | 176,211-213,218-221,229-252,256-263,272-282,292-305,312-313,317-321,325,329-332,337-340,344-348,353,358-359,365-367 TypeaheadSearchWrapper.vue | 94.24 | 66.66 | 100 | 94.24 | 54-61 fetch.js | 100 | 87.5 | 75 | 100 | 31 instrumentation.js | 82.82 | 100 | 60 | 82.82 | 4-13,18-24 restSearchClient.js | 99.3 | 82.35 | 100 | 99.3 | 124 urlGenerator.js | 88.13 | 66.66 | 100 | 88.13 | 42-48 mediawiki.special.block | 89.51 | 93.22 | 82.35 | 89.51 | SpecialBlock.vue | 93.89 | 93.18 | 72.72 | 93.89 | 245-254,297-302,308-322,440-441,452-454 init.js | 100 | 100 | 100 | 100 | util.js | 62.5 | 90.9 | 100 | 62.5 | 66-107 mediawiki.special.block/components | 95.12 | 91.93 | 87.8 | 95.12 | AdditionalDetailsField.vue | 100 | 80 | 100 | 100 | 68 BlockDetailsField.vue | 100 | 100 | 100 | 100 | BlockLog.vue | 98.94 | 100 | 83.33 | 98.94 | 337-340,401 BlockTypeField.vue | 95.04 | 50 | 100 | 95.04 | 73-77 ConfirmationDialog.vue | 96.34 | 100 | 50 | 96.34 | 70-72 ExpiryField.vue | 95.07 | 89.47 | 100 | 95.07 | 145-146,148-149,177-186,245-246 NamespacesField.vue | 90.42 | 88.88 | 66.66 | 90.42 | 60-68 PagesField.vue | 70.06 | 50 | 50 | 70.06 | 46-47,56-57,72-79,88-90,97-118,127-133 ReasonField.vue | 97.22 | 93.75 | 100 | 97.22 | 101-104 UserLookup.vue | 97.74 | 95.23 | 100 | 97.74 | 145-147,196-198,231-232 ValidatingTextInput.js | 100 | 100 | 100 | 100 | mediawiki.special.block/stores | 95.66 | 87.5 | 90 | 95.66 | block.js | 95.66 | 87.5 | 90 | 95.66 | 323-324,433-434,436-437,457-458,461-462,465-466,480-495 ------------------------------------|---------|----------|---------|---------|--------------------------------------------------------------------------------------------------------------------- --- end --- $ node_modules/.bin/jest -u --- stderr --- FAIL tests/qunit/resources/jquery.tablesorter.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'jquery.tablesorter', QUnit.newMwEnvironment( { | ^ 2 | beforeEach: function () { 3 | this.liveMonths = mw.language.months; 4 | mw.language.months = { at Object.<anonymous> (tests/qunit/resources/jquery.tablesorter.test.js:1:61) FAIL tests/qunit/resources/mediawiki.rcfilters/dm.FiltersViewModel.test.js ● Test suite failed to run Cannot find module 'mediawiki.rcfilters.filters.ui' from 'tests/qunit/resources/mediawiki.rcfilters/dm.FiltersViewModel.test.js' 1 | /* eslint-disable camelcase */ 2 | ( function () { > 3 | const rcfilters = require( 'mediawiki.rcfilters.filters.ui' ); | ^ 4 | const filterDefinition = [ { 5 | name: 'group1', 6 | type: 'send_unselected_if_any', at Resolver._throwModNotFoundError (node_modules/jest-resolve/build/resolver.js:427:11) at require (tests/qunit/resources/mediawiki.rcfilters/dm.FiltersViewModel.test.js:3:20) at Object.<anonymous> (tests/qunit/resources/mediawiki.rcfilters/dm.FiltersViewModel.test.js:1548:2) FAIL tests/qunit/resources/mediawiki.jqueryMsg.test.js ● Test suite failed to run Cannot find module 'mediawiki.jqueryMsg' from 'tests/qunit/resources/mediawiki.jqueryMsg.test.js' 1 | ( function () { > 2 | const jqueryMsg = require( 'mediawiki.jqueryMsg' ).test; | ^ 3 | 4 | /* eslint-disable camelcase */ 5 | let formatText, formatParse, specialCharactersPageName, expectedListUsers, at Resolver._throwModNotFoundError (node_modules/jest-resolve/build/resolver.js:427:11) at require (tests/qunit/resources/mediawiki.jqueryMsg.test.js:2:20) at Object.<anonymous> (tests/qunit/resources/mediawiki.jqueryMsg.test.js:1467:2) FAIL tests/qunit/resources/mediawiki.util/util.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'mediawiki.util', QUnit.newMwEnvironment( { | ^ 2 | messages: { 3 | // Used by accessKeyLabel in test for addPortletLink 4 | brackets: '[$1]', at Object.<anonymous> (tests/qunit/resources/mediawiki.util/util.test.js:1:57) FAIL tests/qunit/resources/startup/mw.loader.test.js ● Test suite failed to run ReferenceError: QUnit is not defined 1 | ( function () { > 2 | QUnit.module( 'mw.loader', QUnit.newMwEnvironment( { | ^ 3 | beforeEach: function ( assert ) { 4 | // Expose for load.mock.php 5 | mw.loader.testFail = function ( reason ) { at QUnit (tests/qunit/resources/startup/mw.loader.test.js:2:2) at Object.<anonymous> (tests/qunit/resources/startup/mw.loader.test.js:1236:2) FAIL tests/qunit/resources/mediawiki.language.test.js ● Test suite failed to run ReferenceError: QUnit is not defined 2 | 'use strict'; 3 | > 4 | QUnit.module( 'mediawiki.language', QUnit.newMwEnvironment( { | ^ 5 | beforeEach: function () { 6 | this.userLang = mw.config.get( 'wgUserLanguage' ); 7 | this.liveLangData = mw.language.data; at QUnit (tests/qunit/resources/mediawiki.language.test.js:4:2) at Object.<anonymous> (tests/qunit/resources/mediawiki.language.test.js:914:2) FAIL tests/qunit/resources/mediawiki.Title.test.js ● Test suite failed to run ReferenceError: QUnit is not defined 75 | }; 76 | > 77 | QUnit.module( 'mediawiki.Title', QUnit.newMwEnvironment( { | ^ 78 | // mw.Title relies on these three config vars 79 | // Restore them after each test run 80 | config: { at QUnit (tests/qunit/resources/mediawiki.Title.test.js:77:2) at Object.<anonymous> (tests/qunit/resources/mediawiki.Title.test.js:771:2) FAIL tests/qunit/resources/jquery.makeCollapsible.test.js ● Test suite failed to run ReferenceError: QUnit is not defined 1 | /* eslint-disable no-jquery/no-class-state */ > 2 | QUnit.module( 'jquery.makeCollapsible', () => { | ^ 3 | const loremIpsum = 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit.'; 4 | 5 | /** at Object.QUnit (tests/qunit/resources/jquery.makeCollapsible.test.js:2:1) FAIL tests/qunit/resources/mediawiki.Uri.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'mediawiki.Uri', ( hooks ) => { | ^ 2 | hooks.beforeEach( function () { 3 | this.sandbox.replace( mw, 'Uri', mw.UriRelative( 'http://example.org/w/index.php' ) ); 4 | } ); at Object.<anonymous> (tests/qunit/resources/mediawiki.Uri.test.js:1:45) FAIL tests/qunit/resources/mediawiki.api/mediawiki.api.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'mediawiki.api', ( hooks ) => { | ^ 2 | const originalFormData = window.FormData; 3 | const originalMwVersion = mw.config.get( 'wgVersion' ); 4 | hooks.beforeEach( function () { at Object.<anonymous> (tests/qunit/resources/mediawiki.api/mediawiki.api.test.js:1:45) FAIL tests/qunit/resources/mediawiki.rcfilters/dm.SavedQueriesModel.test.js ● Test suite failed to run Cannot find module 'mediawiki.rcfilters.filters.ui' from 'tests/qunit/resources/mediawiki.rcfilters/dm.SavedQueriesModel.test.js' 1 | /* eslint-disable camelcase */ 2 | ( function () { > 3 | const rcfilters = require( 'mediawiki.rcfilters.filters.ui' ); | ^ 4 | const filterDefinition = [ { 5 | name: 'group1', 6 | type: 'send_unselected_if_any', at Resolver._throwModNotFoundError (node_modules/jest-resolve/build/resolver.js:427:11) at require (tests/qunit/resources/mediawiki.rcfilters/dm.SavedQueriesModel.test.js:3:20) at Object.<anonymous> (tests/qunit/resources/mediawiki.rcfilters/dm.SavedQueriesModel.test.js:608:2) FAIL tests/qunit/resources/mediawiki.user.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'mediawiki.user', QUnit.newMwEnvironment(), ( hooks ) => { | ^ 2 | hooks.beforeEach( function () { 3 | this.server = this.sandbox.useFakeServer(); 4 | this.server.respondImmediately = true; at Object.<anonymous> (tests/qunit/resources/mediawiki.user.test.js:1:72) FAIL tests/qunit/resources/mediawiki.rcfilters/UriProcessor.test.js ● Test suite failed to run Cannot find module 'mediawiki.rcfilters.filters.ui' from 'tests/qunit/resources/mediawiki.rcfilters/UriProcessor.test.js' 2 | /* eslint no-underscore-dangle: "off" */ 3 | ( function () { > 4 | const rcfilters = require( 'mediawiki.rcfilters.filters.ui' ); | ^ 5 | const mockFilterStructure = [ { 6 | name: 'group1', 7 | title: 'Group 1', at Resolver._throwModNotFoundError (node_modules/jest-resolve/build/resolver.js:427:11) at require (tests/qunit/resources/mediawiki.rcfilters/UriProcessor.test.js:4:20) at Object.<anonymous> (tests/qunit/resources/mediawiki.rcfilters/UriProcessor.test.js:309:2) FAIL tests/jest/mediawiki.special.block/SpecialBlock.test.js ● Test suite failed to run Jest encountered an unexpected token Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. By default "node_modules" folder is ignored by transformers. Here's what you can do: • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. • If you need a custom transformation specify a "transform" option in your config. • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. You'll find more details and examples of these config options in the docs: https://jestjs.io/docs/configuration For information about custom transformations, see: https://jestjs.io/docs/code-transformation Details: /src/repo/resources/src/mediawiki.special.block/SpecialBlock.vue:1 ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,jest){<template> ^ SyntaxError: Unexpected token '<' 4 | const { createTestingPinia } = require( '@pinia/testing' ); 5 | > 6 | const SpecialBlock = require( '../../../resources/src/mediawiki.special.block/SpecialBlock.vue' ); | ^ 7 | 8 | /** 9 | * Mount the SpecialBlock component with the default configuration, at Runtime.createScriptFromCode (node_modules/jest-runtime/build/index.js:1505:14) at Object.require (tests/jest/mediawiki.special.block/SpecialBlock.setup.js:6:22) at Object.require (tests/jest/mediawiki.special.block/SpecialBlock.test.js:5:29) FAIL tests/qunit/resources/mediawiki.base/mediawiki.base.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'mediawiki.base', ( hooks ) => { | ^ 2 | hooks.beforeEach( function () { 3 | this.clock = this.sandbox.useFakeTimers(); 4 | } ); at Object.<anonymous> (tests/qunit/resources/mediawiki.base/mediawiki.base.test.js:1:46) FAIL tests/qunit/resources/mediawiki.DateFormatter/DateFormatter.test.js ● Test suite failed to run ReferenceError: QUnit is not defined 9 | const norm = ( str ) => typeof str === 'string' ? str.replaceAll( '\u2009', ' ' ) : str; 10 | > 11 | QUnit.module( 'mediawiki.DateFormatter static functions', ( hooks ) => { | ^ 12 | let userOptions; 13 | 14 | function fakeOptionsGet( key, fallback ) { at Object.QUnit (tests/qunit/resources/mediawiki.DateFormatter/DateFormatter.test.js:11:1) FAIL tests/qunit/resources/jquery.lengthLimit.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'jquery.lengthLimit', () => { | ^ 2 | // Simple sample (20 chars, 20 bytes) 3 | const simpleSample = '12345678901234567890'; 4 | at Object.<anonymous> (tests/qunit/resources/jquery.lengthLimit.test.js:1:43) FAIL tests/jest/mediawiki.special.block/stores/block.test.js ● Test suite failed to run Jest encountered an unexpected token Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. By default "node_modules" folder is ignored by transformers. Here's what you can do: • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. • If you need a custom transformation specify a "transform" option in your config. • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. You'll find more details and examples of these config options in the docs: https://jestjs.io/docs/configuration For information about custom transformations, see: https://jestjs.io/docs/code-transformation Details: /src/repo/resources/src/mediawiki.special.block/SpecialBlock.vue:1 ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,jest){<template> ^ SyntaxError: Unexpected token '<' 4 | const { createTestingPinia } = require( '@pinia/testing' ); 5 | > 6 | const SpecialBlock = require( '../../../resources/src/mediawiki.special.block/SpecialBlock.vue' ); | ^ 7 | 8 | /** 9 | * Mount the SpecialBlock component with the default configuration, at Runtime.createScriptFromCode (node_modules/jest-runtime/build/index.js:1505:14) at Object.require (tests/jest/mediawiki.special.block/SpecialBlock.setup.js:6:22) at Object.require (tests/jest/mediawiki.special.block/stores/block.test.js:6:29) FAIL tests/qunit/resources/jquery.highlightText.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'jquery.highlightText', () => { | ^ 2 | 3 | QUnit.test.each( 'highlightText()', [ 4 | { at Object.<anonymous> (tests/qunit/resources/jquery.highlightText.test.js:1:45) FAIL tests/qunit/resources/startup/mediawiki.test.js ● Test suite failed to run Cannot find module 'mediawiki.jqueryMsg' from 'tests/qunit/resources/startup/mediawiki.test.js' 1 | ( function () { > 2 | const jqueryMsg = require( 'mediawiki.jqueryMsg' ).test; | ^ 3 | QUnit.module( 'mediawiki' ); 4 | 5 | QUnit.test( 'Initial check', ( assert ) => { at Resolver._throwModNotFoundError (node_modules/jest-resolve/build/resolver.js:427:11) at require (tests/qunit/resources/startup/mediawiki.test.js:2:20) at Object.<anonymous> (tests/qunit/resources/startup/mediawiki.test.js:156:2) FAIL tests/qunit/resources/mediawiki.util/accessKeyLabel.test.js ● Test suite failed to run ReferenceError: QUnit is not defined 1 | ( function () { > 2 | QUnit.module( 'mediawiki.util: jquery.accessKeyLabel', QUnit.newMwEnvironment( { | ^ 3 | messages: { 4 | brackets: '[$1]', 5 | 'word-separator': ' ' at QUnit (tests/qunit/resources/mediawiki.util/accessKeyLabel.test.js:2:2) at Object.<anonymous> (tests/qunit/resources/mediawiki.util/accessKeyLabel.test.js:106:2) FAIL tests/qunit/resources/mediawiki.widgets/MediaSearch/mediawiki.widgets.APIResultsQueue.test.js ● Test suite failed to run ReferenceError: QUnit is not defined 5 | */ 6 | > 7 | QUnit.module( 'mediawiki.widgets.APIResultsQueue' ); | ^ 8 | 9 | ( function () { 10 | let itemCounter = 0; at Object.QUnit (tests/qunit/resources/mediawiki.widgets/MediaSearch/mediawiki.widgets.APIResultsQueue.test.js:7:1) FAIL tests/jest/mediawiki.special.block/BlockLog.test.js ● Test suite failed to run Jest encountered an unexpected token Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. By default "node_modules" folder is ignored by transformers. Here's what you can do: • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. • If you need a custom transformation specify a "transform" option in your config. • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. You'll find more details and examples of these config options in the docs: https://jestjs.io/docs/configuration For information about custom transformations, see: https://jestjs.io/docs/code-transformation Details: /src/repo/resources/src/mediawiki.special.block/SpecialBlock.vue:1 ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,jest){<template> ^ SyntaxError: Unexpected token '<' 4 | const { createTestingPinia } = require( '@pinia/testing' ); 5 | > 6 | const SpecialBlock = require( '../../../resources/src/mediawiki.special.block/SpecialBlock.vue' ); | ^ 7 | 8 | /** 9 | * Mount the SpecialBlock component with the default configuration, at Runtime.createScriptFromCode (node_modules/jest-runtime/build/index.js:1505:14) at Object.require (tests/jest/mediawiki.special.block/SpecialBlock.setup.js:6:22) at Object.require (tests/jest/mediawiki.special.block/BlockLog.test.js:6:43) FAIL tests/qunit/resources/mediawiki.storage.test.js ● Test suite failed to run ReferenceError: QUnit is not defined 2 | const EXPIRY_PREFIX = '_EXPIRY_'; 3 | > 4 | QUnit.module( 'mediawiki.storage' ); | ^ 5 | 6 | QUnit.test( 'set/get(Object) with storage support', function ( assert ) { 7 | const data = {}, at QUnit (tests/qunit/resources/mediawiki.storage.test.js:4:2) at Object.<anonymous> (tests/qunit/resources/mediawiki.storage.test.js:156:2) FAIL tests/qunit/resources/mediawiki.api/mediawiki.api.edit.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'mediawiki.api.edit', ( hooks ) => { | ^ 2 | let server; 3 | hooks.beforeEach( function () { 4 | server = this.sandbox.useFakeServer(); at Object.<anonymous> (tests/qunit/resources/mediawiki.api/mediawiki.api.edit.test.js:1:50) FAIL tests/qunit/resources/mediawiki.String.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'mediawiki.String', () => { | ^ 2 | const { byteLength } = require( 'mediawiki.String' ); 3 | 4 | QUnit.test.each( 'byteLength()', { at Object.<anonymous> (tests/qunit/resources/mediawiki.String.test.js:1:41) FAIL tests/qunit/resources/mediawiki.rcfilters/dm.FilterItem.test.js ● Test suite failed to run ReferenceError: QUnit is not defined 1 | /* eslint-disable camelcase */ 2 | ( function () { > 3 | QUnit.module( 'mediawiki.rcfilters - FilterItem' ); | ^ 4 | const rcfilters = require( 'mediawiki.rcfilters.filters.ui' ); 5 | 6 | QUnit.test( 'Initializing filter item', ( assert ) => { at QUnit (tests/qunit/resources/mediawiki.rcfilters/dm.FilterItem.test.js:3:2) at Object.<anonymous> (tests/qunit/resources/mediawiki.rcfilters/dm.FilterItem.test.js:195:2) FAIL tests/qunit/resources/mediawiki.api/mediawiki.api.options.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'mediawiki.api.options', QUnit.newMwEnvironment(), ( hooks ) => { | ^ 2 | mw.config.set( { 3 | wgUserName: 'Foo' 4 | } ); at Object.<anonymous> (tests/qunit/resources/mediawiki.api/mediawiki.api.options.test.js:1:79) FAIL tests/jest/mediawiki.special.block/UserLookup.test.js ● Test suite failed to run Jest encountered an unexpected token Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. By default "node_modules" folder is ignored by transformers. Here's what you can do: • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. • If you need a custom transformation specify a "transform" option in your config. • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. You'll find more details and examples of these config options in the docs: https://jestjs.io/docs/configuration For information about custom transformations, see: https://jestjs.io/docs/code-transformation Details: /src/repo/resources/src/mediawiki.special.block/SpecialBlock.vue:1 ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,jest){<template> ^ SyntaxError: Unexpected token '<' 4 | const { createTestingPinia } = require( '@pinia/testing' ); 5 | > 6 | const SpecialBlock = require( '../../../resources/src/mediawiki.special.block/SpecialBlock.vue' ); | ^ 7 | 8 | /** 9 | * Mount the SpecialBlock component with the default configuration, at Runtime.createScriptFromCode (node_modules/jest-runtime/build/index.js:1505:14) at Object.require (tests/jest/mediawiki.special.block/SpecialBlock.setup.js:6:22) at Object.require (tests/jest/mediawiki.special.block/UserLookup.test.js:6:60) FAIL tests/qunit/resources/mediawiki.cookie.test.js ● Test suite failed to run Cannot find module 'mediawiki.cookie' from 'tests/qunit/resources/mediawiki.cookie.test.js' 11 | secure: false 12 | }, > 13 | mwCookie = require( 'mediawiki.cookie' ), | ^ 14 | setDefaults = mwCookie.setDefaults, 15 | expiryDate = new Date(); 16 | at Resolver._throwModNotFoundError (node_modules/jest-resolve/build/resolver.js:427:11) at require (tests/qunit/resources/mediawiki.cookie.test.js:13:14) at Object.<anonymous> (tests/qunit/resources/mediawiki.cookie.test.js:183:2) FAIL tests/qunit/resources/mediawiki.visibleTimeout.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'mediawiki.visibleTimeout', QUnit.newMwEnvironment( { | ^ 2 | beforeEach: function () { 3 | // Document with just enough stuff to make the tests work. 4 | const listeners = []; at Object.<anonymous> (tests/qunit/resources/mediawiki.visibleTimeout.test.js:1:67) FAIL tests/qunit/resources/startup/mw.Map.test.js ● Test suite failed to run ReferenceError: QUnit is not defined 5 | const arry = []; 6 | > 7 | QUnit.module( 'mw.Map' ); | ^ 8 | 9 | QUnit.test( 'Store simple string key', ( assert ) => { 10 | const conf = new mw.Map(); at QUnit (tests/qunit/resources/startup/mw.Map.test.js:7:2) at Object.<anonymous> (tests/qunit/resources/startup/mw.Map.test.js:130:2) FAIL tests/qunit/resources/jquery.textSelection.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'jquery.textSelection', () => { | ^ 2 | const sig = { 3 | pre: '--~~~~' 4 | }; at Object.<anonymous> (tests/qunit/resources/jquery.textSelection.test.js:1:45) FAIL tests/jest/mediawiki.special.block/ExpiryField.test.js ● Test suite failed to run Jest encountered an unexpected token Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. By default "node_modules" folder is ignored by transformers. Here's what you can do: • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. • If you need a custom transformation specify a "transform" option in your config. • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. You'll find more details and examples of these config options in the docs: https://jestjs.io/docs/configuration For information about custom transformations, see: https://jestjs.io/docs/code-transformation Details: /src/repo/resources/src/mediawiki.special.block/SpecialBlock.vue:1 ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,jest){<template> ^ SyntaxError: Unexpected token '<' 4 | const { createTestingPinia } = require( '@pinia/testing' ); 5 | > 6 | const SpecialBlock = require( '../../../resources/src/mediawiki.special.block/SpecialBlock.vue' ); | ^ 7 | 8 | /** 9 | * Mount the SpecialBlock component with the default configuration, at Runtime.createScriptFromCode (node_modules/jest-runtime/build/index.js:1505:14) at Object.require (tests/jest/mediawiki.special.block/SpecialBlock.setup.js:6:22) at Object.require (tests/jest/mediawiki.special.block/ExpiryField.test.js:5:29) FAIL tests/qunit/resources/mediawiki.widgets/UserInputWidget/mediawiki.widgets.UserInputWidget.test.js ● Test suite failed to run ReferenceError: QUnit is not defined 3 | */ 4 | > 5 | QUnit.module( 'mediawiki.widgets.UserInputWidget' ); | ^ 6 | 7 | ( function () { 8 | const widgetWithDefaults = new mw.widgets.UserInputWidget( {} ); at Object.QUnit (tests/qunit/resources/mediawiki.widgets/UserInputWidget/mediawiki.widgets.UserInputWidget.test.js:5:1) FAIL tests/qunit/resources/mediawiki.api/mediawiki.rest.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'mediawiki.rest', ( hooks ) => { | ^ 2 | let server; 3 | hooks.beforeEach( function () { 4 | server = this.sandbox.useFakeServer(); at Object.<anonymous> (tests/qunit/resources/mediawiki.api/mediawiki.rest.test.js:1:46) FAIL tests/jest/mediawiki.skinning.typeaheadSearch/restSearchClient.test.js ● restApiSearchClient › 2 results ReferenceError: mw is not defined 121 | const params = { q, limit: limit.toString() }; 122 | const search = new URLSearchParams( params ); > 123 | mw.hook( 'typeaheadSearch.appendUrlParams' ).fire( ( key, value ) => { | ^ 124 | search.append( key, value ); 125 | } ); 126 | const url = `${ searchApiUrl }/v1/search/title?${ search.toString() }`; at Object.mw [as fetchByTitle] (resources/src/mediawiki.skinning.typeaheadSearch/restSearchClient.js:123:4) at Object.fetchByTitle (tests/jest/mediawiki.skinning.typeaheadSearch/restSearchClient.test.js:59:99) ● restApiSearchClient › 0 results ReferenceError: mw is not defined 121 | const params = { q, limit: limit.toString() }; 122 | const search = new URLSearchParams( params ); > 123 | mw.hook( 'typeaheadSearch.appendUrlParams' ).fire( ( key, value ) => { | ^ 124 | search.append( key, value ); 125 | } ); 126 | const url = `${ searchApiUrl }/v1/search/title?${ search.toString() }`; at Object.mw [as fetchByTitle] (resources/src/mediawiki.skinning.typeaheadSearch/restSearchClient.js:123:4) at Object.fetchByTitle (tests/jest/mediawiki.skinning.typeaheadSearch/restSearchClient.test.js:90:99) ● restApiSearchClient › recommendations service The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string. Consider using the "jsdom" test environment. ReferenceError: window is not defined 27 | // so replacing it with no-op if it doesn't exist. 28 | // eslint-disable-next-line compat/compat > 29 | const controller = window.AbortController ? | ^ 30 | // eslint-disable-next-line compat/compat 31 | new AbortController() : 32 | nullAbortController; at window (resources/src/mediawiki.skinning.typeaheadSearch/fetch.js:29:21) at Object.fetchJson [as fetchRecommendationByTitle] (resources/src/mediawiki.skinning.typeaheadSearch/restSearchClient.js:103:19) at Object.fetchRecommendationByTitle (tests/jest/mediawiki.skinning.typeaheadSearch/restSearchClient.test.js:123:5) ● restApiSearchClient › network error ReferenceError: mw is not defined 121 | const params = { q, limit: limit.toString() }; 122 | const search = new URLSearchParams( params ); > 123 | mw.hook( 'typeaheadSearch.appendUrlParams' ).fire( ( key, value ) => { | ^ 124 | search.append( key, value ); 125 | } ); 126 | const url = `${ searchApiUrl }/v1/search/title?${ search.toString() }`; at Object.mw [as fetchByTitle] (resources/src/mediawiki.skinning.typeaheadSearch/restSearchClient.js:123:4) at Object.fetchByTitle (tests/jest/mediawiki.skinning.typeaheadSearch/restSearchClient.test.js:137:87) FAIL tests/qunit/resources/mediawiki.cldr.test.js ● Test suite failed to run ReferenceError: QUnit is not defined 60 | }; 61 | > 62 | QUnit.module( 'mediawiki.cldr', QUnit.newMwEnvironment() ); | ^ 63 | 64 | function pluralTest( langCode, tests ) { 65 | QUnit.test( 'Plural Test for ' + langCode, ( assert ) => { at QUnit (tests/qunit/resources/mediawiki.cldr.test.js:62:2) at Object.<anonymous> (tests/qunit/resources/mediawiki.cldr.test.js:83:2) FAIL tests/qunit/resources/mediawiki.deflate.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'mediawiki.deflate', () => { | ^ 2 | let seed = 1234567890; 3 | function getPseudoRandom() { 4 | seed = seed * 16807 % 2147483646; at Object.<anonymous> (tests/qunit/resources/mediawiki.deflate.test.js:1:42) FAIL tests/qunit/resources/mediawiki.api/mediawiki.api.category.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'mediawiki.api.category', ( hooks ) => { | ^ 2 | let server; 3 | hooks.beforeEach( function () { 4 | server = this.sandbox.useFakeServer(); at Object.<anonymous> (tests/qunit/resources/mediawiki.api/mediawiki.api.category.test.js:1:54) FAIL tests/qunit/resources/mediawiki.pager.codex/limitSelectors.test.js ● Test suite failed to run Cannot find module 'mediawiki.pager.codex/limitSelectors.js' from 'tests/qunit/resources/mediawiki.pager.codex/limitSelectors.test.js' > 1 | const limitSelectors = require( 'mediawiki.pager.codex/limitSelectors.js' ); | ^ 2 | 3 | QUnit.module( 'mediawiki.pager.codex.limitSelectors', QUnit.newMwEnvironment( { 4 | beforeEach: function () { at Resolver._throwModNotFoundError (node_modules/jest-resolve/build/resolver.js:427:11) at Object.<anonymous> (tests/qunit/resources/mediawiki.pager.codex/limitSelectors.test.js:1:76) FAIL tests/qunit/resources/mediawiki.widgets/Table/mediawiki.widgets.TableWidget.test.js ● Test suite failed to run ReferenceError: QUnit is not defined 3 | */ 4 | > 5 | QUnit.module( 'mediawiki.widgets.TableWidget' ); | ^ 6 | 7 | ( function () { 8 | const widgetA = new mw.widgets.TableWidget( { at Object.QUnit (tests/qunit/resources/mediawiki.widgets/Table/mediawiki.widgets.TableWidget.test.js:5:1) FAIL tests/qunit/resources/startup/clientprefs.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'startup/clientprefs', () => { | ^ 2 | // See /resources/src/startup/clientprefs.js 3 | const clientprefs = mw.clientprefs; 4 | at Object.<anonymous> (tests/qunit/resources/startup/clientprefs.test.js:1:44) FAIL tests/jest/mediawiki.special.block/util.test.js ● util › sanitizeRange (IPv4 range) ReferenceError: mw is not defined 71 | it.each( santizeRangeTestCases )( 'sanitizeRange ($title)', 72 | ( { input, expected, sanitizeIP, isIPv4Address, isIPv6Address } ) => { > 73 | mw.util.sanitizeIP = jest.fn().mockReturnValue( sanitizeIP || input ); | ^ 74 | mw.util.isIPv4Address = jest.fn().mockReturnValue( !!isIPv4Address ); 75 | mw.util.isIPv6Address = jest.fn().mockReturnValue( !!isIPv6Address ); 76 | expect( util.sanitizeRange( input ) ).toBe( expected ); at mw (tests/jest/mediawiki.special.block/util.test.js:73:4) ● util › sanitizeRange (IPv4 range 2) ReferenceError: mw is not defined 71 | it.each( santizeRangeTestCases )( 'sanitizeRange ($title)', 72 | ( { input, expected, sanitizeIP, isIPv4Address, isIPv6Address } ) => { > 73 | mw.util.sanitizeIP = jest.fn().mockReturnValue( sanitizeIP || input ); | ^ 74 | mw.util.isIPv4Address = jest.fn().mockReturnValue( !!isIPv4Address ); 75 | mw.util.isIPv6Address = jest.fn().mockReturnValue( !!isIPv6Address ); 76 | expect( util.sanitizeRange( input ) ).toBe( expected ); at mw (tests/jest/mediawiki.special.block/util.test.js:73:4) ● util › sanitizeRange (IPv4 large range) ReferenceError: mw is not defined 71 | it.each( santizeRangeTestCases )( 'sanitizeRange ($title)', 72 | ( { input, expected, sanitizeIP, isIPv4Address, isIPv6Address } ) => { > 73 | mw.util.sanitizeIP = jest.fn().mockReturnValue( sanitizeIP || input ); | ^ 74 | mw.util.isIPv4Address = jest.fn().mockReturnValue( !!isIPv4Address ); 75 | mw.util.isIPv6Address = jest.fn().mockReturnValue( !!isIPv6Address ); 76 | expect( util.sanitizeRange( input ) ).toBe( expected ); at mw (tests/jest/mediawiki.special.block/util.test.js:73:4) ● util › sanitizeRange (IPv4 intermediate range) ReferenceError: mw is not defined 71 | it.each( santizeRangeTestCases )( 'sanitizeRange ($title)', 72 | ( { input, expected, sanitizeIP, isIPv4Address, isIPv6Address } ) => { > 73 | mw.util.sanitizeIP = jest.fn().mockReturnValue( sanitizeIP || input ); | ^ 74 | mw.util.isIPv4Address = jest.fn().mockReturnValue( !!isIPv4Address ); 75 | mw.util.isIPv6Address = jest.fn().mockReturnValue( !!isIPv6Address ); 76 | expect( util.sanitizeRange( input ) ).toBe( expected ); at mw (tests/jest/mediawiki.special.block/util.test.js:73:4) ● util › sanitizeRange (IPv4 silly range) ReferenceError: mw is not defined 71 | it.each( santizeRangeTestCases )( 'sanitizeRange ($title)', 72 | ( { input, expected, sanitizeIP, isIPv4Address, isIPv6Address } ) => { > 73 | mw.util.sanitizeIP = jest.fn().mockReturnValue( sanitizeIP || input ); | ^ 74 | mw.util.isIPv4Address = jest.fn().mockReturnValue( !!isIPv4Address ); 75 | mw.util.isIPv6Address = jest.fn().mockReturnValue( !!isIPv6Address ); 76 | expect( util.sanitizeRange( input ) ).toBe( expected ); at mw (tests/jest/mediawiki.special.block/util.test.js:73:4) ● util › sanitizeRange (IPv4 non-range) ReferenceError: mw is not defined 71 | it.each( santizeRangeTestCases )( 'sanitizeRange ($title)', 72 | ( { input, expected, sanitizeIP, isIPv4Address, isIPv6Address } ) => { > 73 | mw.util.sanitizeIP = jest.fn().mockReturnValue( sanitizeIP || input ); | ^ 74 | mw.util.isIPv4Address = jest.fn().mockReturnValue( !!isIPv4Address ); 75 | mw.util.isIPv6Address = jest.fn().mockReturnValue( !!isIPv6Address ); 76 | expect( util.sanitizeRange( input ) ).toBe( expected ); at mw (tests/jest/mediawiki.special.block/util.test.js:73:4) ● util › sanitizeRange (IPv6 range) ReferenceError: mw is not defined 71 | it.each( santizeRangeTestCases )( 'sanitizeRange ($title)', 72 | ( { input, expected, sanitizeIP, isIPv4Address, isIPv6Address } ) => { > 73 | mw.util.sanitizeIP = jest.fn().mockReturnValue( sanitizeIP || input ); | ^ 74 | mw.util.isIPv4Address = jest.fn().mockReturnValue( !!isIPv4Address ); 75 | mw.util.isIPv6Address = jest.fn().mockReturnValue( !!isIPv6Address ); 76 | expect( util.sanitizeRange( input ) ).toBe( expected ); at mw (tests/jest/mediawiki.special.block/util.test.js:73:4) ● util › sanitizeRange (IPv6 range 2) ReferenceError: mw is not defined 71 | it.each( santizeRangeTestCases )( 'sanitizeRange ($title)', 72 | ( { input, expected, sanitizeIP, isIPv4Address, isIPv6Address } ) => { > 73 | mw.util.sanitizeIP = jest.fn().mockReturnValue( sanitizeIP || input ); | ^ 74 | mw.util.isIPv4Address = jest.fn().mockReturnValue( !!isIPv4Address ); 75 | mw.util.isIPv6Address = jest.fn().mockReturnValue( !!isIPv6Address ); 76 | expect( util.sanitizeRange( input ) ).toBe( expected ); at mw (tests/jest/mediawiki.special.block/util.test.js:73:4) ● util › sanitizeRange (IPv6 large range) ReferenceError: mw is not defined 71 | it.each( santizeRangeTestCases )( 'sanitizeRange ($title)', 72 | ( { input, expected, sanitizeIP, isIPv4Address, isIPv6Address } ) => { > 73 | mw.util.sanitizeIP = jest.fn().mockReturnValue( sanitizeIP || input ); | ^ 74 | mw.util.isIPv4Address = jest.fn().mockReturnValue( !!isIPv4Address ); 75 | mw.util.isIPv6Address = jest.fn().mockReturnValue( !!isIPv6Address ); 76 | expect( util.sanitizeRange( input ) ).toBe( expected ); at mw (tests/jest/mediawiki.special.block/util.test.js:73:4) ● util › sanitizeRange (IPv6 intermediate range) ReferenceError: mw is not defined 71 | it.each( santizeRangeTestCases )( 'sanitizeRange ($title)', 72 | ( { input, expected, sanitizeIP, isIPv4Address, isIPv6Address } ) => { > 73 | mw.util.sanitizeIP = jest.fn().mockReturnValue( sanitizeIP || input ); | ^ 74 | mw.util.isIPv4Address = jest.fn().mockReturnValue( !!isIPv4Address ); 75 | mw.util.isIPv6Address = jest.fn().mockReturnValue( !!isIPv6Address ); 76 | expect( util.sanitizeRange( input ) ).toBe( expected ); at mw (tests/jest/mediawiki.special.block/util.test.js:73:4) ● util › sanitizeRange (IPv6 silly range) ReferenceError: mw is not defined 71 | it.each( santizeRangeTestCases )( 'sanitizeRange ($title)', 72 | ( { input, expected, sanitizeIP, isIPv4Address, isIPv6Address } ) => { > 73 | mw.util.sanitizeIP = jest.fn().mockReturnValue( sanitizeIP || input ); | ^ 74 | mw.util.isIPv4Address = jest.fn().mockReturnValue( !!isIPv4Address ); 75 | mw.util.isIPv6Address = jest.fn().mockReturnValue( !!isIPv6Address ); 76 | expect( util.sanitizeRange( input ) ).toBe( expected ); at mw (tests/jest/mediawiki.special.block/util.test.js:73:4) ● util › sanitizeRange (IPv6 non range) ReferenceError: mw is not defined 71 | it.each( santizeRangeTestCases )( 'sanitizeRange ($title)', 72 | ( { input, expected, sanitizeIP, isIPv4Address, isIPv6Address } ) => { > 73 | mw.util.sanitizeIP = jest.fn().mockReturnValue( sanitizeIP || input ); | ^ 74 | mw.util.isIPv4Address = jest.fn().mockReturnValue( !!isIPv4Address ); 75 | mw.util.isIPv6Address = jest.fn().mockReturnValue( !!isIPv6Address ); 76 | expect( util.sanitizeRange( input ) ).toBe( expected ); at mw (tests/jest/mediawiki.special.block/util.test.js:73:4) ● util › formatTimestamp ReferenceError: mw is not defined 92 | 93 | it.each( formatTimestampCases )( 'formatTimestamp', ( { input, expected } ) => { > 94 | mw.util.isInfinity = jest.fn().mockReturnValue( input === 'infinity' ); | ^ 95 | expect( util.formatTimestamp( input ) ).toBe( expected ); 96 | } ); 97 | } ); at mw (tests/jest/mediawiki.special.block/util.test.js:94:3) ● util › formatTimestamp ReferenceError: mw is not defined 92 | 93 | it.each( formatTimestampCases )( 'formatTimestamp', ( { input, expected } ) => { > 94 | mw.util.isInfinity = jest.fn().mockReturnValue( input === 'infinity' ); | ^ 95 | expect( util.formatTimestamp( input ) ).toBe( expected ); 96 | } ); 97 | } ); at mw (tests/jest/mediawiki.special.block/util.test.js:94:3) FAIL tests/qunit/resources/mediawiki.base/track.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'mediawiki.base/track', () => { | ^ 2 | 3 | QUnit.test( 'track', ( assert ) => { 4 | const sequence = []; at Object.<anonymous> (tests/qunit/resources/mediawiki.base/track.test.js:1:45) FAIL tests/qunit/resources/mediawiki.ForeignApi/mediawiki.ForeignApi.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'mediawiki.ForeignApi', ( hooks ) => { | ^ 2 | const CoreForeignApi = require( 'mediawiki.ForeignApi.core' ).ForeignApi; 3 | 4 | hooks.beforeEach( function () { at Object.<anonymous> (tests/qunit/resources/mediawiki.ForeignApi/mediawiki.ForeignApi.test.js:1:52) FAIL tests/qunit/resources/mediawiki.base/html.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'mediawiki.base/html', () => { | ^ 2 | 3 | QUnit.test( 'escape', ( assert ) => { 4 | assert.throws( at Object.<anonymous> (tests/qunit/resources/mediawiki.base/html.test.js:1:44) FAIL tests/qunit/resources/testrunner.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'testrunner', () => { | ^ 2 | QUnit.test( 'assert.htmlEqual', ( assert ) => { 3 | assert.htmlEqual( 4 | '<div><p class="some classes" data-length="10">Child paragraph with <a href="http://example.com">A link</a></p>Regular text<span>A span</span></div>', at Object.<anonymous> (tests/qunit/resources/testrunner.test.js:1:35) FAIL tests/qunit/resources/mediawiki.ForeignApi/mediawiki.ForeignRest.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'mediawiki.ForeignRest', ( hooks ) => { | ^ 2 | const CoreForeignApi = require( 'mediawiki.ForeignApi.core' ).ForeignApi; 3 | const CoreForeignRest = require( 'mediawiki.ForeignApi.core' ).ForeignRest; 4 | at Object.<anonymous> (tests/qunit/resources/mediawiki.ForeignApi/mediawiki.ForeignRest.test.js:1:53) FAIL tests/jest/mediawiki.skinning.typeaheadSearch/fetch.test.js ● abort() using AbortController › Aborting an unfinished request throws an AbortError The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string. Consider using the "jsdom" test environment. ReferenceError: window is not defined 27 | // so replacing it with no-op if it doesn't exist. 28 | // eslint-disable-next-line compat/compat > 29 | const controller = window.AbortController ? | ^ 30 | // eslint-disable-next-line compat/compat 31 | new AbortController() : 32 | nullAbortController; at window (resources/src/mediawiki.skinning.typeaheadSearch/fetch.js:29:21) at Object.fetchJson (tests/jest/mediawiki.skinning.typeaheadSearch/fetch.test.js:12:28) ● abort() using AbortController › Aborting an unfinished request throws an AbortError expect.assertions(1) Expected one assertion to be called but received zero assertion calls. 8 | describe( 'abort() using AbortController', () => { 9 | test( 'Aborting an unfinished request throws an AbortError', async () => { > 10 | expect.assertions( 1 ); | ^ 11 | 12 | const { abort, fetch } = fetchJson( url ); 13 | at Object.assertions (tests/jest/mediawiki.skinning.typeaheadSearch/fetch.test.js:10:10) ● fetch() using window.fetch › 200 without init param passed The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string. Consider using the "jsdom" test environment. ReferenceError: window is not defined 27 | // so replacing it with no-op if it doesn't exist. 28 | // eslint-disable-next-line compat/compat > 29 | const controller = window.AbortController ? | ^ 30 | // eslint-disable-next-line compat/compat 31 | new AbortController() : 32 | nullAbortController; at window (resources/src/mediawiki.skinning.typeaheadSearch/fetch.js:29:21) at Object.fetchJson (tests/jest/mediawiki.skinning.typeaheadSearch/fetch.test.js:54:21) ● fetch() using window.fetch › 200 with init param passed The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string. Consider using the "jsdom" test environment. ReferenceError: window is not defined 27 | // so replacing it with no-op if it doesn't exist. 28 | // eslint-disable-next-line compat/compat > 29 | const controller = window.AbortController ? | ^ 30 | // eslint-disable-next-line compat/compat 31 | new AbortController() : 32 | nullAbortController; at window (resources/src/mediawiki.skinning.typeaheadSearch/fetch.js:29:21) at Object.fetchJson (tests/jest/mediawiki.skinning.typeaheadSearch/fetch.test.js:66:21) ● fetch() using window.fetch › 404 response The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string. Consider using the "jsdom" test environment. ReferenceError: window is not defined 27 | // so replacing it with no-op if it doesn't exist. 28 | // eslint-disable-next-line compat/compat > 29 | const controller = window.AbortController ? | ^ 30 | // eslint-disable-next-line compat/compat 31 | new AbortController() : 32 | nullAbortController; at window (resources/src/mediawiki.skinning.typeaheadSearch/fetch.js:29:21) at Object.fetchJson (tests/jest/mediawiki.skinning.typeaheadSearch/fetch.test.js:82:21) ● fetch() using window.fetch › 404 response expect.assertions(1) Expected one assertion to be called but received zero assertion calls. 79 | 80 | test( '404 response', async () => { > 81 | expect.assertions( 1 ); | ^ 82 | const { fetch } = fetchJson( '//en.wikipedia.org/doesNotExist' ); 83 | 84 | await expect( fetch ) at Object.assertions (tests/jest/mediawiki.skinning.typeaheadSearch/fetch.test.js:81:10) FAIL vendor/wikimedia/parsoid/bin/domdiff.test.js ● Test suite failed to run Cannot find module './lib/utils/promise.js' from 'vendor/wikimedia/parsoid/core-upgrade.js' Require stack: vendor/wikimedia/parsoid/core-upgrade.js vendor/wikimedia/parsoid/bin/domdiff.test.js 2 | 3 | // Register prfun's Promises with node-pn > 4 | var Promise = require('./lib/utils/promise.js'); | ^ 5 | require('pn/_promise')(Promise); // This only needs to be done once. 6 | 7 | // Comments below annotate the highest lts version of node for which the at Resolver._throwModNotFoundError (node_modules/jest-resolve/build/resolver.js:427:11) at Object.require (vendor/wikimedia/parsoid/core-upgrade.js:4:15) at Object.require (vendor/wikimedia/parsoid/bin/domdiff.test.js:5:1) FAIL tests/qunit/resources/mediawiki.base/errorLogger.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'mediawiki.base/errorLogger', () => { | ^ 2 | 3 | QUnit.test( 'installGlobalHandler', function ( assert ) { 4 | const errorMessage = 'Foo'; at Object.<anonymous> (tests/qunit/resources/mediawiki.base/errorLogger.test.js:1:51) FAIL tests/qunit/resources/startup/mw.requestIdleCallback.test.js ● Test suite failed to run ReferenceError: QUnit is not defined 1 | ( function () { > 2 | QUnit.module( 'mw.requestIdleCallback', QUnit.newMwEnvironment( { | ^ 3 | beforeEach: function () { 4 | const clock = this.clock = this.sandbox.useFakeTimers(); 5 | at QUnit (tests/qunit/resources/startup/mw.requestIdleCallback.test.js:2:2) at Object.<anonymous> (tests/qunit/resources/startup/mw.requestIdleCallback.test.js:105:2) FAIL tests/jest/mediawiki.skinning.typeaheadSearch/App.test.js ● Test suite failed to run Jest encountered an unexpected token Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. By default "node_modules" folder is ignored by transformers. Here's what you can do: • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. • If you need a custom transformation specify a "transform" option in your config. • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. You'll find more details and examples of these config options in the docs: https://jestjs.io/docs/configuration For information about custom transformations, see: https://jestjs.io/docs/code-transformation Details: /src/repo/resources/src/mediawiki.skinning.typeaheadSearch/App.vue:1 ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,jest){<template> ^ SyntaxError: Unexpected token '<' 1 | const VueTestUtils = require( '@vue/test-utils' ); > 2 | const App = require( '../../../resources/src/mediawiki.skinning.typeaheadSearch/App.vue' ); | ^ 3 | const urlGeneratorFn = require( '../../../resources/src/mediawiki.skinning.typeaheadSearch/urlGenerator.js' ); 4 | const scriptPath = '/w/index.php'; 5 | const urlGenerator = urlGeneratorFn( scriptPath ); at Runtime.createScriptFromCode (node_modules/jest-runtime/build/index.js:1505:14) at Object.require (tests/jest/mediawiki.skinning.typeaheadSearch/App.test.js:2:13) FAIL tests/jest/mediawiki.skinning.typeaheadSearch/instrumentation.test.js ● instrumentation › addWprovToSearchResultUrls without offset ReferenceError: location is not defined 57 | return results.map( ( result, index ) => { 58 | if ( result.url ) { > 59 | const url = new URL( result.url, location.href ); | ^ 60 | url.searchParams.set( 'wprov', getWprovFromResultIndex( index + offset ) ); 61 | result = Object.assign( {}, result, { url: url.toString() } ); 62 | } at location (resources/src/mediawiki.skinning.typeaheadSearch/instrumentation.js:59:37) at Array.map (<anonymous>) at Object.map [as addWprovToSearchResultUrls] (resources/src/mediawiki.skinning.typeaheadSearch/instrumentation.js:57:17) at Object.addWprovToSearchResultUrls (tests/jest/mediawiki.skinning.typeaheadSearch/instrumentation.test.js:40:27) ● instrumentation › addWprovToSearchResultUrls with offset ReferenceError: location is not defined 57 | return results.map( ( result, index ) => { 58 | if ( result.url ) { > 59 | const url = new URL( result.url, location.href ); | ^ 60 | url.searchParams.set( 'wprov', getWprovFromResultIndex( index + offset ) ); 61 | result = Object.assign( {}, result, { url: url.toString() } ); 62 | } at location (resources/src/mediawiki.skinning.typeaheadSearch/instrumentation.js:59:37) at Array.map (<anonymous>) at Object.map [as addWprovToSearchResultUrls] (resources/src/mediawiki.skinning.typeaheadSearch/instrumentation.js:57:17) at Object.addWprovToSearchResultUrls (tests/jest/mediawiki.skinning.typeaheadSearch/instrumentation.test.js:79:27) FAIL tests/qunit/resources/mediawiki.api/mediawiki.api.watch.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'mediawiki.api.watch', ( hooks ) => { | ^ 2 | let server; 3 | hooks.beforeEach( function () { 4 | server = this.sandbox.useFakeServer(); at Object.<anonymous> (tests/qunit/resources/mediawiki.api/mediawiki.api.watch.test.js:1:51) FAIL tests/jest/mediawiki.special.block/NamespacesField.test.js ● Test suite failed to run Jest encountered an unexpected token Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. By default "node_modules" folder is ignored by transformers. Here's what you can do: • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. • If you need a custom transformation specify a "transform" option in your config. • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. You'll find more details and examples of these config options in the docs: https://jestjs.io/docs/configuration For information about custom transformations, see: https://jestjs.io/docs/code-transformation Details: /src/repo/resources/src/mediawiki.special.block/SpecialBlock.vue:1 ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,jest){<template> ^ SyntaxError: Unexpected token '<' 4 | const { createTestingPinia } = require( '@pinia/testing' ); 5 | > 6 | const SpecialBlock = require( '../../../resources/src/mediawiki.special.block/SpecialBlock.vue' ); | ^ 7 | 8 | /** 9 | * Mount the SpecialBlock component with the default configuration, at Runtime.createScriptFromCode (node_modules/jest-runtime/build/index.js:1505:14) at Object.require (tests/jest/mediawiki.special.block/SpecialBlock.setup.js:6:22) at Object.require (tests/jest/mediawiki.special.block/NamespacesField.test.js:5:29) FAIL tests/qunit/resources/mediawiki.toc.test.js ● Test suite failed to run ReferenceError: QUnit is not defined 1 | ( function () { > 2 | QUnit.module( 'mediawiki.toc', { | ^ 3 | beforeEach: function () { 4 | this.getCookie = this.stub( mw.cookie, 'get' ).returns( null ); 5 | this.setCookie = this.stub( mw.cookie, 'set' ).returns( null ); at QUnit (tests/qunit/resources/mediawiki.toc.test.js:2:2) at Object.<anonymous> (tests/qunit/resources/mediawiki.toc.test.js:42:2) FAIL vendor/wikimedia/parsoid/bin/normalize.test.js ● Test suite failed to run Cannot find module './lib/utils/promise.js' from 'vendor/wikimedia/parsoid/core-upgrade.js' Require stack: vendor/wikimedia/parsoid/core-upgrade.js vendor/wikimedia/parsoid/bin/normalize.test.js 2 | 3 | // Register prfun's Promises with node-pn > 4 | var Promise = require('./lib/utils/promise.js'); | ^ 5 | require('pn/_promise')(Promise); // This only needs to be done once. 6 | 7 | // Comments below annotate the highest lts version of node for which the at Resolver._throwModNotFoundError (node_modules/jest-resolve/build/resolver.js:427:11) at Object.require (vendor/wikimedia/parsoid/core-upgrade.js:4:15) at Object.require (vendor/wikimedia/parsoid/bin/normalize.test.js:5:1) FAIL tests/qunit/resources/mediawiki.rcfilters/dm.SavedQueryItemModel.test.js ● Test suite failed to run Cannot find module 'mediawiki.rcfilters.filters.ui' from 'tests/qunit/resources/mediawiki.rcfilters/dm.SavedQueryItemModel.test.js' 1 | /* eslint-disable camelcase */ 2 | ( function () { > 3 | const rcfilters = require( 'mediawiki.rcfilters.filters.ui' ); | ^ 4 | const itemData = { 5 | params: { 6 | param1: '1', at Resolver._throwModNotFoundError (node_modules/jest-resolve/build/resolver.js:427:11) at require (tests/qunit/resources/mediawiki.rcfilters/dm.SavedQueryItemModel.test.js:3:20) at Object.<anonymous> (tests/qunit/resources/mediawiki.rcfilters/dm.SavedQueryItemModel.test.js:88:2) FAIL tests/qunit/resources/mediawiki.api/mediawiki.api.parse.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'mediawiki.api.edit', ( hooks ) => { | ^ 2 | let server; 3 | hooks.beforeEach( function () { 4 | server = this.sandbox.useFakeServer(); at Object.<anonymous> (tests/qunit/resources/mediawiki.api/mediawiki.api.parse.test.js:1:50) FAIL tests/qunit/resources/mediawiki.template.test.js ● Test suite failed to run ReferenceError: QUnit is not defined 1 | ( function () { 2 | > 3 | QUnit.module( 'mediawiki.template', { | ^ 4 | beforeEach: function () { 5 | const abcCompiler = { 6 | compile: function () { at QUnit (tests/qunit/resources/mediawiki.template.test.js:3:2) at Object.<anonymous> (tests/qunit/resources/mediawiki.template.test.js:63:2) FAIL tests/qunit/resources/mediawiki.api/mediawiki.api.messages.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'mediawiki.api.messages', ( hooks ) => { | ^ 2 | let server; 3 | hooks.beforeEach( function () { 4 | server = this.sandbox.useFakeServer(); at Object.<anonymous> (tests/qunit/resources/mediawiki.api/mediawiki.api.messages.test.js:1:54) FAIL tests/jest/mediawiki.special.block/ReasonField.test.js ● Test suite failed to run Jest encountered an unexpected token Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. By default "node_modules" folder is ignored by transformers. Here's what you can do: • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. • If you need a custom transformation specify a "transform" option in your config. • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. You'll find more details and examples of these config options in the docs: https://jestjs.io/docs/configuration For information about custom transformations, see: https://jestjs.io/docs/code-transformation Details: /src/repo/resources/src/mediawiki.special.block/components/ReasonField.vue:1 ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,jest){<template> ^ SyntaxError: Unexpected token '<' 2 | 3 | const { mount, shallowMount } = require( '@vue/test-utils' ); > 4 | const ReasonField = require( '../../../resources/src/mediawiki.special.block/components/ReasonField.vue' ); | ^ 5 | const { mockMwConfigGet } = require( './SpecialBlock.setup.js' ); 6 | 7 | describe( 'ReasonField', () => { at Runtime.createScriptFromCode (node_modules/jest-runtime/build/index.js:1505:14) at Object.require (tests/jest/mediawiki.special.block/ReasonField.test.js:4:21) FAIL tests/jest/mediawiki.special.block/BlockDetailsField.test.js ● Test suite failed to run Jest encountered an unexpected token Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. By default "node_modules" folder is ignored by transformers. Here's what you can do: • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. • If you need a custom transformation specify a "transform" option in your config. • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. You'll find more details and examples of these config options in the docs: https://jestjs.io/docs/configuration For information about custom transformations, see: https://jestjs.io/docs/code-transformation Details: /src/repo/resources/src/mediawiki.special.block/SpecialBlock.vue:1 ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,jest){<template> ^ SyntaxError: Unexpected token '<' 4 | const { createTestingPinia } = require( '@pinia/testing' ); 5 | > 6 | const SpecialBlock = require( '../../../resources/src/mediawiki.special.block/SpecialBlock.vue' ); | ^ 7 | 8 | /** 9 | * Mount the SpecialBlock component with the default configuration, at Runtime.createScriptFromCode (node_modules/jest-runtime/build/index.js:1505:14) at Object.require (tests/jest/mediawiki.special.block/SpecialBlock.setup.js:6:22) at Object.require (tests/jest/mediawiki.special.block/BlockDetailsField.test.js:5:29) FAIL tests/jest/mediawiki.special.block/init.test.js ● SpecialBlock init.js › should give the form the ID mw-block-form The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string. Consider using the "jsdom" test environment. ReferenceError: document is not defined 5 | 6 | beforeEach( () => { > 7 | document.body.innerHTML = ''; | ^ 8 | const form = document.createElement( 'form' ); 9 | form.className = 'mw-htmlform'; 10 | document.body.appendChild( form ); at Object.document (tests/jest/mediawiki.special.block/init.test.js:7:3) ● SpecialBlock init.js › should do nothing if there is no mw-htmlform The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string. Consider using the "jsdom" test environment. ReferenceError: document is not defined 5 | 6 | beforeEach( () => { > 7 | document.body.innerHTML = ''; | ^ 8 | const form = document.createElement( 'form' ); 9 | form.className = 'mw-htmlform'; 10 | document.body.appendChild( form ); at Object.document (tests/jest/mediawiki.special.block/init.test.js:7:3) FAIL tests/qunit/resources/mediawiki.experiments.test.js ● Test suite failed to run ReferenceError: mw is not defined 1 | ( function () { 2 | > 3 | const getBucket = mw.experiments.getBucket; | ^ 4 | 5 | function createExperiment() { 6 | return { at mw (tests/qunit/resources/mediawiki.experiments.test.js:3:20) at Object.<anonymous> (tests/qunit/resources/mediawiki.experiments.test.js:63:2) FAIL tests/jest/mediawiki.special.block/AdditionalDetailsField.test.js ● Test suite failed to run Jest encountered an unexpected token Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. By default "node_modules" folder is ignored by transformers. Here's what you can do: • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. • If you need a custom transformation specify a "transform" option in your config. • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. You'll find more details and examples of these config options in the docs: https://jestjs.io/docs/configuration For information about custom transformations, see: https://jestjs.io/docs/code-transformation Details: /src/repo/resources/src/mediawiki.special.block/SpecialBlock.vue:1 ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,jest){<template> ^ SyntaxError: Unexpected token '<' 4 | const { createTestingPinia } = require( '@pinia/testing' ); 5 | > 6 | const SpecialBlock = require( '../../../resources/src/mediawiki.special.block/SpecialBlock.vue' ); | ^ 7 | 8 | /** 9 | * Mount the SpecialBlock component with the default configuration, at Runtime.createScriptFromCode (node_modules/jest-runtime/build/index.js:1505:14) at Object.require (tests/jest/mediawiki.special.block/SpecialBlock.setup.js:6:22) at Object.require (tests/jest/mediawiki.special.block/AdditionalDetailsField.test.js:5:29) FAIL tests/qunit/resources/mediawiki.widgets/NamespaceInput/mediawiki.widgets.NamespaceInputWidget.test.js ● Test suite failed to run ReferenceError: QUnit is not defined 3 | */ 4 | > 5 | QUnit.module( 'mediawiki.widgets.NamespaceInputWidget' ); | ^ 6 | 7 | ( function () { 8 | const widgetA = new mw.widgets.NamespaceInputWidget( {} ); at Object.QUnit (tests/qunit/resources/mediawiki.widgets/NamespaceInput/mediawiki.widgets.NamespaceInputWidget.test.js:5:1) FAIL tests/qunit/resources/startup/jscompat.test.js ● Test suite failed to run ReferenceError: QUnit is not defined 1 | // JavaScript compatibility tests to confirm that server and browser 2 | // are behaving consistently and configured correctly. > 3 | QUnit.module( 'startup/jscompat', () => { | ^ 4 | 5 | QUnit.test( 'Unicode variable name', ( assert ) => { 6 | const ŝablono = true; at Object.QUnit (tests/qunit/resources/startup/jscompat.test.js:3:1) FAIL tests/qunit/resources/mediawiki.template.mustache.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'mediawiki.template.mustache', ( hooks ) => { | ^ 2 | 3 | hooks.beforeEach( function () { 4 | // Stub register some templates at Object.<anonymous> (tests/qunit/resources/mediawiki.template.mustache.test.js:1:59) PASS tests/jest/mediawiki.skinning.typeaheadSearch/urlGenerator.test.js FAIL tests/qunit/resources/mediawiki.special.block/AdditionalDetailsField.test.js ● Test suite failed to run Cannot find module 'vue-test-utils' from 'tests/qunit/resources/mediawiki.special.block/AdditionalDetailsField.test.js' > 1 | const { shallowMount } = require( 'vue-test-utils' ); | ^ 2 | const { createPinia } = require( 'pinia' ); 3 | const AdditionalDetailsField = require( 'mediawiki.special.block.codex/components/AdditionalDetailsField.vue' ); 4 | const useBlockStore = require( 'mediawiki.special.block.codex/stores/block.js' ); at Resolver._throwModNotFoundError (node_modules/jest-resolve/build/resolver.js:427:11) at Object.require (tests/qunit/resources/mediawiki.special.block/AdditionalDetailsField.test.js:1:26) FAIL tests/qunit/resources/mediawiki.messagePoster/factory.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'mediawiki.messagePoster', ( hooks ) => { | ^ 2 | const TEST_MODEL = 'test-content-model'; 3 | 4 | hooks.afterEach( () => { at Object.<anonymous> (tests/qunit/resources/mediawiki.messagePoster/factory.test.js:1:55) FAIL tests/qunit/resources/mediawiki.inspect.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'mediawiki.inspect', () => { | ^ 2 | 3 | QUnit.test( '.getModuleSize() - scripts', ( assert ) => { 4 | // Use eval so that the size doesn't change depending on minification at Object.<anonymous> (tests/qunit/resources/mediawiki.inspect.test.js:1:42) FAIL tests/qunit/resources/mediawiki.router.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'mediawiki.router', () => { | ^ 2 | const router = require( 'mediawiki.router' ); 3 | 4 | QUnit.test( 'instance', ( assert ) => { at Object.<anonymous> (tests/qunit/resources/mediawiki.router.test.js:1:41) FAIL tests/qunit/resources/mediawiki.api/mediawiki.api.upload.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'mediawiki.api.upload', () => { | ^ 2 | 3 | QUnit.test( 'Basic functionality', ( assert ) => { 4 | const api = new mw.Api(); at Object.<anonymous> (tests/qunit/resources/mediawiki.api/mediawiki.api.upload.test.js:1:45) FAIL tests/qunit/resources/jquery.tablesorter.parsers.test.js ● Test suite failed to run Your test suite must contain at least one test. at onResult (node_modules/@jest/core/build/TestScheduler.js:133:18) at node_modules/@jest/core/build/TestScheduler.js:254:19 at node_modules/emittery/index.js:363:13 at Array.map (<anonymous>) at Emittery.emit (node_modules/emittery/index.js:361:23) Summary of all failing tests FAIL tests/qunit/resources/jquery.tablesorter.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'jquery.tablesorter', QUnit.newMwEnvironment( { | ^ 2 | beforeEach: function () { 3 | this.liveMonths = mw.language.months; 4 | mw.language.months = { at Object.<anonymous> (tests/qunit/resources/jquery.tablesorter.test.js:1:61) FAIL tests/qunit/resources/mediawiki.rcfilters/dm.FiltersViewModel.test.js ● Test suite failed to run Cannot find module 'mediawiki.rcfilters.filters.ui' from 'tests/qunit/resources/mediawiki.rcfilters/dm.FiltersViewModel.test.js' 1 | /* eslint-disable camelcase */ 2 | ( function () { > 3 | const rcfilters = require( 'mediawiki.rcfilters.filters.ui' ); | ^ 4 | const filterDefinition = [ { 5 | name: 'group1', 6 | type: 'send_unselected_if_any', at Resolver._throwModNotFoundError (node_modules/jest-resolve/build/resolver.js:427:11) at require (tests/qunit/resources/mediawiki.rcfilters/dm.FiltersViewModel.test.js:3:20) at Object.<anonymous> (tests/qunit/resources/mediawiki.rcfilters/dm.FiltersViewModel.test.js:1548:2) FAIL tests/qunit/resources/mediawiki.jqueryMsg.test.js ● Test suite failed to run Cannot find module 'mediawiki.jqueryMsg' from 'tests/qunit/resources/mediawiki.jqueryMsg.test.js' 1 | ( function () { > 2 | const jqueryMsg = require( 'mediawiki.jqueryMsg' ).test; | ^ 3 | 4 | /* eslint-disable camelcase */ 5 | let formatText, formatParse, specialCharactersPageName, expectedListUsers, at Resolver._throwModNotFoundError (node_modules/jest-resolve/build/resolver.js:427:11) at require (tests/qunit/resources/mediawiki.jqueryMsg.test.js:2:20) at Object.<anonymous> (tests/qunit/resources/mediawiki.jqueryMsg.test.js:1467:2) FAIL tests/qunit/resources/mediawiki.util/util.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'mediawiki.util', QUnit.newMwEnvironment( { | ^ 2 | messages: { 3 | // Used by accessKeyLabel in test for addPortletLink 4 | brackets: '[$1]', at Object.<anonymous> (tests/qunit/resources/mediawiki.util/util.test.js:1:57) FAIL tests/qunit/resources/startup/mw.loader.test.js ● Test suite failed to run ReferenceError: QUnit is not defined 1 | ( function () { > 2 | QUnit.module( 'mw.loader', QUnit.newMwEnvironment( { | ^ 3 | beforeEach: function ( assert ) { 4 | // Expose for load.mock.php 5 | mw.loader.testFail = function ( reason ) { at QUnit (tests/qunit/resources/startup/mw.loader.test.js:2:2) at Object.<anonymous> (tests/qunit/resources/startup/mw.loader.test.js:1236:2) FAIL tests/qunit/resources/mediawiki.language.test.js ● Test suite failed to run ReferenceError: QUnit is not defined 2 | 'use strict'; 3 | > 4 | QUnit.module( 'mediawiki.language', QUnit.newMwEnvironment( { | ^ 5 | beforeEach: function () { 6 | this.userLang = mw.config.get( 'wgUserLanguage' ); 7 | this.liveLangData = mw.language.data; at QUnit (tests/qunit/resources/mediawiki.language.test.js:4:2) at Object.<anonymous> (tests/qunit/resources/mediawiki.language.test.js:914:2) FAIL tests/qunit/resources/mediawiki.Title.test.js ● Test suite failed to run ReferenceError: QUnit is not defined 75 | }; 76 | > 77 | QUnit.module( 'mediawiki.Title', QUnit.newMwEnvironment( { | ^ 78 | // mw.Title relies on these three config vars 79 | // Restore them after each test run 80 | config: { at QUnit (tests/qunit/resources/mediawiki.Title.test.js:77:2) at Object.<anonymous> (tests/qunit/resources/mediawiki.Title.test.js:771:2) FAIL tests/qunit/resources/jquery.makeCollapsible.test.js ● Test suite failed to run ReferenceError: QUnit is not defined 1 | /* eslint-disable no-jquery/no-class-state */ > 2 | QUnit.module( 'jquery.makeCollapsible', () => { | ^ 3 | const loremIpsum = 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit.'; 4 | 5 | /** at Object.QUnit (tests/qunit/resources/jquery.makeCollapsible.test.js:2:1) FAIL tests/qunit/resources/mediawiki.Uri.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'mediawiki.Uri', ( hooks ) => { | ^ 2 | hooks.beforeEach( function () { 3 | this.sandbox.replace( mw, 'Uri', mw.UriRelative( 'http://example.org/w/index.php' ) ); 4 | } ); at Object.<anonymous> (tests/qunit/resources/mediawiki.Uri.test.js:1:45) FAIL tests/qunit/resources/mediawiki.api/mediawiki.api.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'mediawiki.api', ( hooks ) => { | ^ 2 | const originalFormData = window.FormData; 3 | const originalMwVersion = mw.config.get( 'wgVersion' ); 4 | hooks.beforeEach( function () { at Object.<anonymous> (tests/qunit/resources/mediawiki.api/mediawiki.api.test.js:1:45) FAIL tests/qunit/resources/mediawiki.rcfilters/dm.SavedQueriesModel.test.js ● Test suite failed to run Cannot find module 'mediawiki.rcfilters.filters.ui' from 'tests/qunit/resources/mediawiki.rcfilters/dm.SavedQueriesModel.test.js' 1 | /* eslint-disable camelcase */ 2 | ( function () { > 3 | const rcfilters = require( 'mediawiki.rcfilters.filters.ui' ); | ^ 4 | const filterDefinition = [ { 5 | name: 'group1', 6 | type: 'send_unselected_if_any', at Resolver._throwModNotFoundError (node_modules/jest-resolve/build/resolver.js:427:11) at require (tests/qunit/resources/mediawiki.rcfilters/dm.SavedQueriesModel.test.js:3:20) at Object.<anonymous> (tests/qunit/resources/mediawiki.rcfilters/dm.SavedQueriesModel.test.js:608:2) FAIL tests/qunit/resources/mediawiki.user.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'mediawiki.user', QUnit.newMwEnvironment(), ( hooks ) => { | ^ 2 | hooks.beforeEach( function () { 3 | this.server = this.sandbox.useFakeServer(); 4 | this.server.respondImmediately = true; at Object.<anonymous> (tests/qunit/resources/mediawiki.user.test.js:1:72) FAIL tests/qunit/resources/mediawiki.rcfilters/UriProcessor.test.js ● Test suite failed to run Cannot find module 'mediawiki.rcfilters.filters.ui' from 'tests/qunit/resources/mediawiki.rcfilters/UriProcessor.test.js' 2 | /* eslint no-underscore-dangle: "off" */ 3 | ( function () { > 4 | const rcfilters = require( 'mediawiki.rcfilters.filters.ui' ); | ^ 5 | const mockFilterStructure = [ { 6 | name: 'group1', 7 | title: 'Group 1', at Resolver._throwModNotFoundError (node_modules/jest-resolve/build/resolver.js:427:11) at require (tests/qunit/resources/mediawiki.rcfilters/UriProcessor.test.js:4:20) at Object.<anonymous> (tests/qunit/resources/mediawiki.rcfilters/UriProcessor.test.js:309:2) FAIL tests/jest/mediawiki.special.block/SpecialBlock.test.js ● Test suite failed to run Jest encountered an unexpected token Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. By default "node_modules" folder is ignored by transformers. Here's what you can do: • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. • If you need a custom transformation specify a "transform" option in your config. • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. You'll find more details and examples of these config options in the docs: https://jestjs.io/docs/configuration For information about custom transformations, see: https://jestjs.io/docs/code-transformation Details: /src/repo/resources/src/mediawiki.special.block/SpecialBlock.vue:1 ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,jest){<template> ^ SyntaxError: Unexpected token '<' 4 | const { createTestingPinia } = require( '@pinia/testing' ); 5 | > 6 | const SpecialBlock = require( '../../../resources/src/mediawiki.special.block/SpecialBlock.vue' ); | ^ 7 | 8 | /** 9 | * Mount the SpecialBlock component with the default configuration, at Runtime.createScriptFromCode (node_modules/jest-runtime/build/index.js:1505:14) at Object.require (tests/jest/mediawiki.special.block/SpecialBlock.setup.js:6:22) at Object.require (tests/jest/mediawiki.special.block/SpecialBlock.test.js:5:29) FAIL tests/qunit/resources/mediawiki.base/mediawiki.base.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'mediawiki.base', ( hooks ) => { | ^ 2 | hooks.beforeEach( function () { 3 | this.clock = this.sandbox.useFakeTimers(); 4 | } ); at Object.<anonymous> (tests/qunit/resources/mediawiki.base/mediawiki.base.test.js:1:46) FAIL tests/qunit/resources/mediawiki.DateFormatter/DateFormatter.test.js ● Test suite failed to run ReferenceError: QUnit is not defined 9 | const norm = ( str ) => typeof str === 'string' ? str.replaceAll( '\u2009', ' ' ) : str; 10 | > 11 | QUnit.module( 'mediawiki.DateFormatter static functions', ( hooks ) => { | ^ 12 | let userOptions; 13 | 14 | function fakeOptionsGet( key, fallback ) { at Object.QUnit (tests/qunit/resources/mediawiki.DateFormatter/DateFormatter.test.js:11:1) FAIL tests/qunit/resources/jquery.lengthLimit.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'jquery.lengthLimit', () => { | ^ 2 | // Simple sample (20 chars, 20 bytes) 3 | const simpleSample = '12345678901234567890'; 4 | at Object.<anonymous> (tests/qunit/resources/jquery.lengthLimit.test.js:1:43) FAIL tests/jest/mediawiki.special.block/stores/block.test.js ● Test suite failed to run Jest encountered an unexpected token Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. By default "node_modules" folder is ignored by transformers. Here's what you can do: • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. • If you need a custom transformation specify a "transform" option in your config. • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. You'll find more details and examples of these config options in the docs: https://jestjs.io/docs/configuration For information about custom transformations, see: https://jestjs.io/docs/code-transformation Details: /src/repo/resources/src/mediawiki.special.block/SpecialBlock.vue:1 ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,jest){<template> ^ SyntaxError: Unexpected token '<' 4 | const { createTestingPinia } = require( '@pinia/testing' ); 5 | > 6 | const SpecialBlock = require( '../../../resources/src/mediawiki.special.block/SpecialBlock.vue' ); | ^ 7 | 8 | /** 9 | * Mount the SpecialBlock component with the default configuration, at Runtime.createScriptFromCode (node_modules/jest-runtime/build/index.js:1505:14) at Object.require (tests/jest/mediawiki.special.block/SpecialBlock.setup.js:6:22) at Object.require (tests/jest/mediawiki.special.block/stores/block.test.js:6:29) FAIL tests/qunit/resources/jquery.highlightText.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'jquery.highlightText', () => { | ^ 2 | 3 | QUnit.test.each( 'highlightText()', [ 4 | { at Object.<anonymous> (tests/qunit/resources/jquery.highlightText.test.js:1:45) FAIL tests/qunit/resources/startup/mediawiki.test.js ● Test suite failed to run Cannot find module 'mediawiki.jqueryMsg' from 'tests/qunit/resources/startup/mediawiki.test.js' 1 | ( function () { > 2 | const jqueryMsg = require( 'mediawiki.jqueryMsg' ).test; | ^ 3 | QUnit.module( 'mediawiki' ); 4 | 5 | QUnit.test( 'Initial check', ( assert ) => { at Resolver._throwModNotFoundError (node_modules/jest-resolve/build/resolver.js:427:11) at require (tests/qunit/resources/startup/mediawiki.test.js:2:20) at Object.<anonymous> (tests/qunit/resources/startup/mediawiki.test.js:156:2) FAIL tests/qunit/resources/mediawiki.util/accessKeyLabel.test.js ● Test suite failed to run ReferenceError: QUnit is not defined 1 | ( function () { > 2 | QUnit.module( 'mediawiki.util: jquery.accessKeyLabel', QUnit.newMwEnvironment( { | ^ 3 | messages: { 4 | brackets: '[$1]', 5 | 'word-separator': ' ' at QUnit (tests/qunit/resources/mediawiki.util/accessKeyLabel.test.js:2:2) at Object.<anonymous> (tests/qunit/resources/mediawiki.util/accessKeyLabel.test.js:106:2) FAIL tests/qunit/resources/mediawiki.widgets/MediaSearch/mediawiki.widgets.APIResultsQueue.test.js ● Test suite failed to run ReferenceError: QUnit is not defined 5 | */ 6 | > 7 | QUnit.module( 'mediawiki.widgets.APIResultsQueue' ); | ^ 8 | 9 | ( function () { 10 | let itemCounter = 0; at Object.QUnit (tests/qunit/resources/mediawiki.widgets/MediaSearch/mediawiki.widgets.APIResultsQueue.test.js:7:1) FAIL tests/jest/mediawiki.special.block/BlockLog.test.js ● Test suite failed to run Jest encountered an unexpected token Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. By default "node_modules" folder is ignored by transformers. Here's what you can do: • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. • If you need a custom transformation specify a "transform" option in your config. • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. You'll find more details and examples of these config options in the docs: https://jestjs.io/docs/configuration For information about custom transformations, see: https://jestjs.io/docs/code-transformation Details: /src/repo/resources/src/mediawiki.special.block/SpecialBlock.vue:1 ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,jest){<template> ^ SyntaxError: Unexpected token '<' 4 | const { createTestingPinia } = require( '@pinia/testing' ); 5 | > 6 | const SpecialBlock = require( '../../../resources/src/mediawiki.special.block/SpecialBlock.vue' ); | ^ 7 | 8 | /** 9 | * Mount the SpecialBlock component with the default configuration, at Runtime.createScriptFromCode (node_modules/jest-runtime/build/index.js:1505:14) at Object.require (tests/jest/mediawiki.special.block/SpecialBlock.setup.js:6:22) at Object.require (tests/jest/mediawiki.special.block/BlockLog.test.js:6:43) FAIL tests/qunit/resources/mediawiki.storage.test.js ● Test suite failed to run ReferenceError: QUnit is not defined 2 | const EXPIRY_PREFIX = '_EXPIRY_'; 3 | > 4 | QUnit.module( 'mediawiki.storage' ); | ^ 5 | 6 | QUnit.test( 'set/get(Object) with storage support', function ( assert ) { 7 | const data = {}, at QUnit (tests/qunit/resources/mediawiki.storage.test.js:4:2) at Object.<anonymous> (tests/qunit/resources/mediawiki.storage.test.js:156:2) FAIL tests/qunit/resources/mediawiki.api/mediawiki.api.edit.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'mediawiki.api.edit', ( hooks ) => { | ^ 2 | let server; 3 | hooks.beforeEach( function () { 4 | server = this.sandbox.useFakeServer(); at Object.<anonymous> (tests/qunit/resources/mediawiki.api/mediawiki.api.edit.test.js:1:50) FAIL tests/qunit/resources/mediawiki.String.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'mediawiki.String', () => { | ^ 2 | const { byteLength } = require( 'mediawiki.String' ); 3 | 4 | QUnit.test.each( 'byteLength()', { at Object.<anonymous> (tests/qunit/resources/mediawiki.String.test.js:1:41) FAIL tests/qunit/resources/mediawiki.rcfilters/dm.FilterItem.test.js ● Test suite failed to run ReferenceError: QUnit is not defined 1 | /* eslint-disable camelcase */ 2 | ( function () { > 3 | QUnit.module( 'mediawiki.rcfilters - FilterItem' ); | ^ 4 | const rcfilters = require( 'mediawiki.rcfilters.filters.ui' ); 5 | 6 | QUnit.test( 'Initializing filter item', ( assert ) => { at QUnit (tests/qunit/resources/mediawiki.rcfilters/dm.FilterItem.test.js:3:2) at Object.<anonymous> (tests/qunit/resources/mediawiki.rcfilters/dm.FilterItem.test.js:195:2) FAIL tests/qunit/resources/mediawiki.api/mediawiki.api.options.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'mediawiki.api.options', QUnit.newMwEnvironment(), ( hooks ) => { | ^ 2 | mw.config.set( { 3 | wgUserName: 'Foo' 4 | } ); at Object.<anonymous> (tests/qunit/resources/mediawiki.api/mediawiki.api.options.test.js:1:79) FAIL tests/jest/mediawiki.special.block/UserLookup.test.js ● Test suite failed to run Jest encountered an unexpected token Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. By default "node_modules" folder is ignored by transformers. Here's what you can do: • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. • If you need a custom transformation specify a "transform" option in your config. • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. You'll find more details and examples of these config options in the docs: https://jestjs.io/docs/configuration For information about custom transformations, see: https://jestjs.io/docs/code-transformation Details: /src/repo/resources/src/mediawiki.special.block/SpecialBlock.vue:1 ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,jest){<template> ^ SyntaxError: Unexpected token '<' 4 | const { createTestingPinia } = require( '@pinia/testing' ); 5 | > 6 | const SpecialBlock = require( '../../../resources/src/mediawiki.special.block/SpecialBlock.vue' ); | ^ 7 | 8 | /** 9 | * Mount the SpecialBlock component with the default configuration, at Runtime.createScriptFromCode (node_modules/jest-runtime/build/index.js:1505:14) at Object.require (tests/jest/mediawiki.special.block/SpecialBlock.setup.js:6:22) at Object.require (tests/jest/mediawiki.special.block/UserLookup.test.js:6:60) FAIL tests/qunit/resources/mediawiki.cookie.test.js ● Test suite failed to run Cannot find module 'mediawiki.cookie' from 'tests/qunit/resources/mediawiki.cookie.test.js' 11 | secure: false 12 | }, > 13 | mwCookie = require( 'mediawiki.cookie' ), | ^ 14 | setDefaults = mwCookie.setDefaults, 15 | expiryDate = new Date(); 16 | at Resolver._throwModNotFoundError (node_modules/jest-resolve/build/resolver.js:427:11) at require (tests/qunit/resources/mediawiki.cookie.test.js:13:14) at Object.<anonymous> (tests/qunit/resources/mediawiki.cookie.test.js:183:2) FAIL tests/qunit/resources/mediawiki.visibleTimeout.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'mediawiki.visibleTimeout', QUnit.newMwEnvironment( { | ^ 2 | beforeEach: function () { 3 | // Document with just enough stuff to make the tests work. 4 | const listeners = []; at Object.<anonymous> (tests/qunit/resources/mediawiki.visibleTimeout.test.js:1:67) FAIL tests/qunit/resources/startup/mw.Map.test.js ● Test suite failed to run ReferenceError: QUnit is not defined 5 | const arry = []; 6 | > 7 | QUnit.module( 'mw.Map' ); | ^ 8 | 9 | QUnit.test( 'Store simple string key', ( assert ) => { 10 | const conf = new mw.Map(); at QUnit (tests/qunit/resources/startup/mw.Map.test.js:7:2) at Object.<anonymous> (tests/qunit/resources/startup/mw.Map.test.js:130:2) FAIL tests/qunit/resources/jquery.textSelection.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'jquery.textSelection', () => { | ^ 2 | const sig = { 3 | pre: '--~~~~' 4 | }; at Object.<anonymous> (tests/qunit/resources/jquery.textSelection.test.js:1:45) FAIL tests/jest/mediawiki.special.block/ExpiryField.test.js ● Test suite failed to run Jest encountered an unexpected token Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. By default "node_modules" folder is ignored by transformers. Here's what you can do: • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. • If you need a custom transformation specify a "transform" option in your config. • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. You'll find more details and examples of these config options in the docs: https://jestjs.io/docs/configuration For information about custom transformations, see: https://jestjs.io/docs/code-transformation Details: /src/repo/resources/src/mediawiki.special.block/SpecialBlock.vue:1 ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,jest){<template> ^ SyntaxError: Unexpected token '<' 4 | const { createTestingPinia } = require( '@pinia/testing' ); 5 | > 6 | const SpecialBlock = require( '../../../resources/src/mediawiki.special.block/SpecialBlock.vue' ); | ^ 7 | 8 | /** 9 | * Mount the SpecialBlock component with the default configuration, at Runtime.createScriptFromCode (node_modules/jest-runtime/build/index.js:1505:14) at Object.require (tests/jest/mediawiki.special.block/SpecialBlock.setup.js:6:22) at Object.require (tests/jest/mediawiki.special.block/ExpiryField.test.js:5:29) FAIL tests/qunit/resources/mediawiki.widgets/UserInputWidget/mediawiki.widgets.UserInputWidget.test.js ● Test suite failed to run ReferenceError: QUnit is not defined 3 | */ 4 | > 5 | QUnit.module( 'mediawiki.widgets.UserInputWidget' ); | ^ 6 | 7 | ( function () { 8 | const widgetWithDefaults = new mw.widgets.UserInputWidget( {} ); at Object.QUnit (tests/qunit/resources/mediawiki.widgets/UserInputWidget/mediawiki.widgets.UserInputWidget.test.js:5:1) FAIL tests/qunit/resources/mediawiki.api/mediawiki.rest.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'mediawiki.rest', ( hooks ) => { | ^ 2 | let server; 3 | hooks.beforeEach( function () { 4 | server = this.sandbox.useFakeServer(); at Object.<anonymous> (tests/qunit/resources/mediawiki.api/mediawiki.rest.test.js:1:46) FAIL tests/jest/mediawiki.skinning.typeaheadSearch/restSearchClient.test.js ● restApiSearchClient › 2 results ReferenceError: mw is not defined 121 | const params = { q, limit: limit.toString() }; 122 | const search = new URLSearchParams( params ); > 123 | mw.hook( 'typeaheadSearch.appendUrlParams' ).fire( ( key, value ) => { | ^ 124 | search.append( key, value ); 125 | } ); 126 | const url = `${ searchApiUrl }/v1/search/title?${ search.toString() }`; at Object.mw [as fetchByTitle] (resources/src/mediawiki.skinning.typeaheadSearch/restSearchClient.js:123:4) at Object.fetchByTitle (tests/jest/mediawiki.skinning.typeaheadSearch/restSearchClient.test.js:59:99) ● restApiSearchClient › 0 results ReferenceError: mw is not defined 121 | const params = { q, limit: limit.toString() }; 122 | const search = new URLSearchParams( params ); > 123 | mw.hook( 'typeaheadSearch.appendUrlParams' ).fire( ( key, value ) => { | ^ 124 | search.append( key, value ); 125 | } ); 126 | const url = `${ searchApiUrl }/v1/search/title?${ search.toString() }`; at Object.mw [as fetchByTitle] (resources/src/mediawiki.skinning.typeaheadSearch/restSearchClient.js:123:4) at Object.fetchByTitle (tests/jest/mediawiki.skinning.typeaheadSearch/restSearchClient.test.js:90:99) ● restApiSearchClient › recommendations service The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string. Consider using the "jsdom" test environment. ReferenceError: window is not defined 27 | // so replacing it with no-op if it doesn't exist. 28 | // eslint-disable-next-line compat/compat > 29 | const controller = window.AbortController ? | ^ 30 | // eslint-disable-next-line compat/compat 31 | new AbortController() : 32 | nullAbortController; at window (resources/src/mediawiki.skinning.typeaheadSearch/fetch.js:29:21) at Object.fetchJson [as fetchRecommendationByTitle] (resources/src/mediawiki.skinning.typeaheadSearch/restSearchClient.js:103:19) at Object.fetchRecommendationByTitle (tests/jest/mediawiki.skinning.typeaheadSearch/restSearchClient.test.js:123:5) ● restApiSearchClient › network error ReferenceError: mw is not defined 121 | const params = { q, limit: limit.toString() }; 122 | const search = new URLSearchParams( params ); > 123 | mw.hook( 'typeaheadSearch.appendUrlParams' ).fire( ( key, value ) => { | ^ 124 | search.append( key, value ); 125 | } ); 126 | const url = `${ searchApiUrl }/v1/search/title?${ search.toString() }`; at Object.mw [as fetchByTitle] (resources/src/mediawiki.skinning.typeaheadSearch/restSearchClient.js:123:4) at Object.fetchByTitle (tests/jest/mediawiki.skinning.typeaheadSearch/restSearchClient.test.js:137:87) FAIL tests/qunit/resources/mediawiki.cldr.test.js ● Test suite failed to run ReferenceError: QUnit is not defined 60 | }; 61 | > 62 | QUnit.module( 'mediawiki.cldr', QUnit.newMwEnvironment() ); | ^ 63 | 64 | function pluralTest( langCode, tests ) { 65 | QUnit.test( 'Plural Test for ' + langCode, ( assert ) => { at QUnit (tests/qunit/resources/mediawiki.cldr.test.js:62:2) at Object.<anonymous> (tests/qunit/resources/mediawiki.cldr.test.js:83:2) FAIL tests/qunit/resources/mediawiki.deflate.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'mediawiki.deflate', () => { | ^ 2 | let seed = 1234567890; 3 | function getPseudoRandom() { 4 | seed = seed * 16807 % 2147483646; at Object.<anonymous> (tests/qunit/resources/mediawiki.deflate.test.js:1:42) FAIL tests/qunit/resources/mediawiki.api/mediawiki.api.category.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'mediawiki.api.category', ( hooks ) => { | ^ 2 | let server; 3 | hooks.beforeEach( function () { 4 | server = this.sandbox.useFakeServer(); at Object.<anonymous> (tests/qunit/resources/mediawiki.api/mediawiki.api.category.test.js:1:54) FAIL tests/qunit/resources/mediawiki.pager.codex/limitSelectors.test.js ● Test suite failed to run Cannot find module 'mediawiki.pager.codex/limitSelectors.js' from 'tests/qunit/resources/mediawiki.pager.codex/limitSelectors.test.js' > 1 | const limitSelectors = require( 'mediawiki.pager.codex/limitSelectors.js' ); | ^ 2 | 3 | QUnit.module( 'mediawiki.pager.codex.limitSelectors', QUnit.newMwEnvironment( { 4 | beforeEach: function () { at Resolver._throwModNotFoundError (node_modules/jest-resolve/build/resolver.js:427:11) at Object.<anonymous> (tests/qunit/resources/mediawiki.pager.codex/limitSelectors.test.js:1:76) FAIL tests/qunit/resources/mediawiki.widgets/Table/mediawiki.widgets.TableWidget.test.js ● Test suite failed to run ReferenceError: QUnit is not defined 3 | */ 4 | > 5 | QUnit.module( 'mediawiki.widgets.TableWidget' ); | ^ 6 | 7 | ( function () { 8 | const widgetA = new mw.widgets.TableWidget( { at Object.QUnit (tests/qunit/resources/mediawiki.widgets/Table/mediawiki.widgets.TableWidget.test.js:5:1) FAIL tests/qunit/resources/startup/clientprefs.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'startup/clientprefs', () => { | ^ 2 | // See /resources/src/startup/clientprefs.js 3 | const clientprefs = mw.clientprefs; 4 | at Object.<anonymous> (tests/qunit/resources/startup/clientprefs.test.js:1:44) FAIL tests/jest/mediawiki.special.block/util.test.js ● util › sanitizeRange (IPv4 range) ReferenceError: mw is not defined 71 | it.each( santizeRangeTestCases )( 'sanitizeRange ($title)', 72 | ( { input, expected, sanitizeIP, isIPv4Address, isIPv6Address } ) => { > 73 | mw.util.sanitizeIP = jest.fn().mockReturnValue( sanitizeIP || input ); | ^ 74 | mw.util.isIPv4Address = jest.fn().mockReturnValue( !!isIPv4Address ); 75 | mw.util.isIPv6Address = jest.fn().mockReturnValue( !!isIPv6Address ); 76 | expect( util.sanitizeRange( input ) ).toBe( expected ); at mw (tests/jest/mediawiki.special.block/util.test.js:73:4) ● util › sanitizeRange (IPv4 range 2) ReferenceError: mw is not defined 71 | it.each( santizeRangeTestCases )( 'sanitizeRange ($title)', 72 | ( { input, expected, sanitizeIP, isIPv4Address, isIPv6Address } ) => { > 73 | mw.util.sanitizeIP = jest.fn().mockReturnValue( sanitizeIP || input ); | ^ 74 | mw.util.isIPv4Address = jest.fn().mockReturnValue( !!isIPv4Address ); 75 | mw.util.isIPv6Address = jest.fn().mockReturnValue( !!isIPv6Address ); 76 | expect( util.sanitizeRange( input ) ).toBe( expected ); at mw (tests/jest/mediawiki.special.block/util.test.js:73:4) ● util › sanitizeRange (IPv4 large range) ReferenceError: mw is not defined 71 | it.each( santizeRangeTestCases )( 'sanitizeRange ($title)', 72 | ( { input, expected, sanitizeIP, isIPv4Address, isIPv6Address } ) => { > 73 | mw.util.sanitizeIP = jest.fn().mockReturnValue( sanitizeIP || input ); | ^ 74 | mw.util.isIPv4Address = jest.fn().mockReturnValue( !!isIPv4Address ); 75 | mw.util.isIPv6Address = jest.fn().mockReturnValue( !!isIPv6Address ); 76 | expect( util.sanitizeRange( input ) ).toBe( expected ); at mw (tests/jest/mediawiki.special.block/util.test.js:73:4) ● util › sanitizeRange (IPv4 intermediate range) ReferenceError: mw is not defined 71 | it.each( santizeRangeTestCases )( 'sanitizeRange ($title)', 72 | ( { input, expected, sanitizeIP, isIPv4Address, isIPv6Address } ) => { > 73 | mw.util.sanitizeIP = jest.fn().mockReturnValue( sanitizeIP || input ); | ^ 74 | mw.util.isIPv4Address = jest.fn().mockReturnValue( !!isIPv4Address ); 75 | mw.util.isIPv6Address = jest.fn().mockReturnValue( !!isIPv6Address ); 76 | expect( util.sanitizeRange( input ) ).toBe( expected ); at mw (tests/jest/mediawiki.special.block/util.test.js:73:4) ● util › sanitizeRange (IPv4 silly range) ReferenceError: mw is not defined 71 | it.each( santizeRangeTestCases )( 'sanitizeRange ($title)', 72 | ( { input, expected, sanitizeIP, isIPv4Address, isIPv6Address } ) => { > 73 | mw.util.sanitizeIP = jest.fn().mockReturnValue( sanitizeIP || input ); | ^ 74 | mw.util.isIPv4Address = jest.fn().mockReturnValue( !!isIPv4Address ); 75 | mw.util.isIPv6Address = jest.fn().mockReturnValue( !!isIPv6Address ); 76 | expect( util.sanitizeRange( input ) ).toBe( expected ); at mw (tests/jest/mediawiki.special.block/util.test.js:73:4) ● util › sanitizeRange (IPv4 non-range) ReferenceError: mw is not defined 71 | it.each( santizeRangeTestCases )( 'sanitizeRange ($title)', 72 | ( { input, expected, sanitizeIP, isIPv4Address, isIPv6Address } ) => { > 73 | mw.util.sanitizeIP = jest.fn().mockReturnValue( sanitizeIP || input ); | ^ 74 | mw.util.isIPv4Address = jest.fn().mockReturnValue( !!isIPv4Address ); 75 | mw.util.isIPv6Address = jest.fn().mockReturnValue( !!isIPv6Address ); 76 | expect( util.sanitizeRange( input ) ).toBe( expected ); at mw (tests/jest/mediawiki.special.block/util.test.js:73:4) ● util › sanitizeRange (IPv6 range) ReferenceError: mw is not defined 71 | it.each( santizeRangeTestCases )( 'sanitizeRange ($title)', 72 | ( { input, expected, sanitizeIP, isIPv4Address, isIPv6Address } ) => { > 73 | mw.util.sanitizeIP = jest.fn().mockReturnValue( sanitizeIP || input ); | ^ 74 | mw.util.isIPv4Address = jest.fn().mockReturnValue( !!isIPv4Address ); 75 | mw.util.isIPv6Address = jest.fn().mockReturnValue( !!isIPv6Address ); 76 | expect( util.sanitizeRange( input ) ).toBe( expected ); at mw (tests/jest/mediawiki.special.block/util.test.js:73:4) ● util › sanitizeRange (IPv6 range 2) ReferenceError: mw is not defined 71 | it.each( santizeRangeTestCases )( 'sanitizeRange ($title)', 72 | ( { input, expected, sanitizeIP, isIPv4Address, isIPv6Address } ) => { > 73 | mw.util.sanitizeIP = jest.fn().mockReturnValue( sanitizeIP || input ); | ^ 74 | mw.util.isIPv4Address = jest.fn().mockReturnValue( !!isIPv4Address ); 75 | mw.util.isIPv6Address = jest.fn().mockReturnValue( !!isIPv6Address ); 76 | expect( util.sanitizeRange( input ) ).toBe( expected ); at mw (tests/jest/mediawiki.special.block/util.test.js:73:4) ● util › sanitizeRange (IPv6 large range) ReferenceError: mw is not defined 71 | it.each( santizeRangeTestCases )( 'sanitizeRange ($title)', 72 | ( { input, expected, sanitizeIP, isIPv4Address, isIPv6Address } ) => { > 73 | mw.util.sanitizeIP = jest.fn().mockReturnValue( sanitizeIP || input ); | ^ 74 | mw.util.isIPv4Address = jest.fn().mockReturnValue( !!isIPv4Address ); 75 | mw.util.isIPv6Address = jest.fn().mockReturnValue( !!isIPv6Address ); 76 | expect( util.sanitizeRange( input ) ).toBe( expected ); at mw (tests/jest/mediawiki.special.block/util.test.js:73:4) ● util › sanitizeRange (IPv6 intermediate range) ReferenceError: mw is not defined 71 | it.each( santizeRangeTestCases )( 'sanitizeRange ($title)', 72 | ( { input, expected, sanitizeIP, isIPv4Address, isIPv6Address } ) => { > 73 | mw.util.sanitizeIP = jest.fn().mockReturnValue( sanitizeIP || input ); | ^ 74 | mw.util.isIPv4Address = jest.fn().mockReturnValue( !!isIPv4Address ); 75 | mw.util.isIPv6Address = jest.fn().mockReturnValue( !!isIPv6Address ); 76 | expect( util.sanitizeRange( input ) ).toBe( expected ); at mw (tests/jest/mediawiki.special.block/util.test.js:73:4) ● util › sanitizeRange (IPv6 silly range) ReferenceError: mw is not defined 71 | it.each( santizeRangeTestCases )( 'sanitizeRange ($title)', 72 | ( { input, expected, sanitizeIP, isIPv4Address, isIPv6Address } ) => { > 73 | mw.util.sanitizeIP = jest.fn().mockReturnValue( sanitizeIP || input ); | ^ 74 | mw.util.isIPv4Address = jest.fn().mockReturnValue( !!isIPv4Address ); 75 | mw.util.isIPv6Address = jest.fn().mockReturnValue( !!isIPv6Address ); 76 | expect( util.sanitizeRange( input ) ).toBe( expected ); at mw (tests/jest/mediawiki.special.block/util.test.js:73:4) ● util › sanitizeRange (IPv6 non range) ReferenceError: mw is not defined 71 | it.each( santizeRangeTestCases )( 'sanitizeRange ($title)', 72 | ( { input, expected, sanitizeIP, isIPv4Address, isIPv6Address } ) => { > 73 | mw.util.sanitizeIP = jest.fn().mockReturnValue( sanitizeIP || input ); | ^ 74 | mw.util.isIPv4Address = jest.fn().mockReturnValue( !!isIPv4Address ); 75 | mw.util.isIPv6Address = jest.fn().mockReturnValue( !!isIPv6Address ); 76 | expect( util.sanitizeRange( input ) ).toBe( expected ); at mw (tests/jest/mediawiki.special.block/util.test.js:73:4) ● util › formatTimestamp ReferenceError: mw is not defined 92 | 93 | it.each( formatTimestampCases )( 'formatTimestamp', ( { input, expected } ) => { > 94 | mw.util.isInfinity = jest.fn().mockReturnValue( input === 'infinity' ); | ^ 95 | expect( util.formatTimestamp( input ) ).toBe( expected ); 96 | } ); 97 | } ); at mw (tests/jest/mediawiki.special.block/util.test.js:94:3) ● util › formatTimestamp ReferenceError: mw is not defined 92 | 93 | it.each( formatTimestampCases )( 'formatTimestamp', ( { input, expected } ) => { > 94 | mw.util.isInfinity = jest.fn().mockReturnValue( input === 'infinity' ); | ^ 95 | expect( util.formatTimestamp( input ) ).toBe( expected ); 96 | } ); 97 | } ); at mw (tests/jest/mediawiki.special.block/util.test.js:94:3) FAIL tests/qunit/resources/mediawiki.base/track.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'mediawiki.base/track', () => { | ^ 2 | 3 | QUnit.test( 'track', ( assert ) => { 4 | const sequence = []; at Object.<anonymous> (tests/qunit/resources/mediawiki.base/track.test.js:1:45) FAIL tests/qunit/resources/mediawiki.ForeignApi/mediawiki.ForeignApi.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'mediawiki.ForeignApi', ( hooks ) => { | ^ 2 | const CoreForeignApi = require( 'mediawiki.ForeignApi.core' ).ForeignApi; 3 | 4 | hooks.beforeEach( function () { at Object.<anonymous> (tests/qunit/resources/mediawiki.ForeignApi/mediawiki.ForeignApi.test.js:1:52) FAIL tests/qunit/resources/mediawiki.base/html.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'mediawiki.base/html', () => { | ^ 2 | 3 | QUnit.test( 'escape', ( assert ) => { 4 | assert.throws( at Object.<anonymous> (tests/qunit/resources/mediawiki.base/html.test.js:1:44) FAIL tests/qunit/resources/testrunner.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'testrunner', () => { | ^ 2 | QUnit.test( 'assert.htmlEqual', ( assert ) => { 3 | assert.htmlEqual( 4 | '<div><p class="some classes" data-length="10">Child paragraph with <a href="http://example.com">A link</a></p>Regular text<span>A span</span></div>', at Object.<anonymous> (tests/qunit/resources/testrunner.test.js:1:35) FAIL tests/qunit/resources/mediawiki.ForeignApi/mediawiki.ForeignRest.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'mediawiki.ForeignRest', ( hooks ) => { | ^ 2 | const CoreForeignApi = require( 'mediawiki.ForeignApi.core' ).ForeignApi; 3 | const CoreForeignRest = require( 'mediawiki.ForeignApi.core' ).ForeignRest; 4 | at Object.<anonymous> (tests/qunit/resources/mediawiki.ForeignApi/mediawiki.ForeignRest.test.js:1:53) FAIL tests/jest/mediawiki.skinning.typeaheadSearch/fetch.test.js ● abort() using AbortController › Aborting an unfinished request throws an AbortError The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string. Consider using the "jsdom" test environment. ReferenceError: window is not defined 27 | // so replacing it with no-op if it doesn't exist. 28 | // eslint-disable-next-line compat/compat > 29 | const controller = window.AbortController ? | ^ 30 | // eslint-disable-next-line compat/compat 31 | new AbortController() : 32 | nullAbortController; at window (resources/src/mediawiki.skinning.typeaheadSearch/fetch.js:29:21) at Object.fetchJson (tests/jest/mediawiki.skinning.typeaheadSearch/fetch.test.js:12:28) ● abort() using AbortController › Aborting an unfinished request throws an AbortError expect.assertions(1) Expected one assertion to be called but received zero assertion calls. 8 | describe( 'abort() using AbortController', () => { 9 | test( 'Aborting an unfinished request throws an AbortError', async () => { > 10 | expect.assertions( 1 ); | ^ 11 | 12 | const { abort, fetch } = fetchJson( url ); 13 | at Object.assertions (tests/jest/mediawiki.skinning.typeaheadSearch/fetch.test.js:10:10) ● fetch() using window.fetch › 200 without init param passed The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string. Consider using the "jsdom" test environment. ReferenceError: window is not defined 27 | // so replacing it with no-op if it doesn't exist. 28 | // eslint-disable-next-line compat/compat > 29 | const controller = window.AbortController ? | ^ 30 | // eslint-disable-next-line compat/compat 31 | new AbortController() : 32 | nullAbortController; at window (resources/src/mediawiki.skinning.typeaheadSearch/fetch.js:29:21) at Object.fetchJson (tests/jest/mediawiki.skinning.typeaheadSearch/fetch.test.js:54:21) ● fetch() using window.fetch › 200 with init param passed The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string. Consider using the "jsdom" test environment. ReferenceError: window is not defined 27 | // so replacing it with no-op if it doesn't exist. 28 | // eslint-disable-next-line compat/compat > 29 | const controller = window.AbortController ? | ^ 30 | // eslint-disable-next-line compat/compat 31 | new AbortController() : 32 | nullAbortController; at window (resources/src/mediawiki.skinning.typeaheadSearch/fetch.js:29:21) at Object.fetchJson (tests/jest/mediawiki.skinning.typeaheadSearch/fetch.test.js:66:21) ● fetch() using window.fetch › 404 response The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string. Consider using the "jsdom" test environment. ReferenceError: window is not defined 27 | // so replacing it with no-op if it doesn't exist. 28 | // eslint-disable-next-line compat/compat > 29 | const controller = window.AbortController ? | ^ 30 | // eslint-disable-next-line compat/compat 31 | new AbortController() : 32 | nullAbortController; at window (resources/src/mediawiki.skinning.typeaheadSearch/fetch.js:29:21) at Object.fetchJson (tests/jest/mediawiki.skinning.typeaheadSearch/fetch.test.js:82:21) ● fetch() using window.fetch › 404 response expect.assertions(1) Expected one assertion to be called but received zero assertion calls. 79 | 80 | test( '404 response', async () => { > 81 | expect.assertions( 1 ); | ^ 82 | const { fetch } = fetchJson( '//en.wikipedia.org/doesNotExist' ); 83 | 84 | await expect( fetch ) at Object.assertions (tests/jest/mediawiki.skinning.typeaheadSearch/fetch.test.js:81:10) FAIL vendor/wikimedia/parsoid/bin/domdiff.test.js ● Test suite failed to run Cannot find module './lib/utils/promise.js' from 'vendor/wikimedia/parsoid/core-upgrade.js' Require stack: vendor/wikimedia/parsoid/core-upgrade.js vendor/wikimedia/parsoid/bin/domdiff.test.js 2 | 3 | // Register prfun's Promises with node-pn > 4 | var Promise = require('./lib/utils/promise.js'); | ^ 5 | require('pn/_promise')(Promise); // This only needs to be done once. 6 | 7 | // Comments below annotate the highest lts version of node for which the at Resolver._throwModNotFoundError (node_modules/jest-resolve/build/resolver.js:427:11) at Object.require (vendor/wikimedia/parsoid/core-upgrade.js:4:15) at Object.require (vendor/wikimedia/parsoid/bin/domdiff.test.js:5:1) FAIL tests/qunit/resources/mediawiki.base/errorLogger.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'mediawiki.base/errorLogger', () => { | ^ 2 | 3 | QUnit.test( 'installGlobalHandler', function ( assert ) { 4 | const errorMessage = 'Foo'; at Object.<anonymous> (tests/qunit/resources/mediawiki.base/errorLogger.test.js:1:51) FAIL tests/qunit/resources/startup/mw.requestIdleCallback.test.js ● Test suite failed to run ReferenceError: QUnit is not defined 1 | ( function () { > 2 | QUnit.module( 'mw.requestIdleCallback', QUnit.newMwEnvironment( { | ^ 3 | beforeEach: function () { 4 | const clock = this.clock = this.sandbox.useFakeTimers(); 5 | at QUnit (tests/qunit/resources/startup/mw.requestIdleCallback.test.js:2:2) at Object.<anonymous> (tests/qunit/resources/startup/mw.requestIdleCallback.test.js:105:2) FAIL tests/jest/mediawiki.skinning.typeaheadSearch/App.test.js ● Test suite failed to run Jest encountered an unexpected token Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. By default "node_modules" folder is ignored by transformers. Here's what you can do: • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. • If you need a custom transformation specify a "transform" option in your config. • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. You'll find more details and examples of these config options in the docs: https://jestjs.io/docs/configuration For information about custom transformations, see: https://jestjs.io/docs/code-transformation Details: /src/repo/resources/src/mediawiki.skinning.typeaheadSearch/App.vue:1 ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,jest){<template> ^ SyntaxError: Unexpected token '<' 1 | const VueTestUtils = require( '@vue/test-utils' ); > 2 | const App = require( '../../../resources/src/mediawiki.skinning.typeaheadSearch/App.vue' ); | ^ 3 | const urlGeneratorFn = require( '../../../resources/src/mediawiki.skinning.typeaheadSearch/urlGenerator.js' ); 4 | const scriptPath = '/w/index.php'; 5 | const urlGenerator = urlGeneratorFn( scriptPath ); at Runtime.createScriptFromCode (node_modules/jest-runtime/build/index.js:1505:14) at Object.require (tests/jest/mediawiki.skinning.typeaheadSearch/App.test.js:2:13) FAIL tests/jest/mediawiki.skinning.typeaheadSearch/instrumentation.test.js ● instrumentation › addWprovToSearchResultUrls without offset ReferenceError: location is not defined 57 | return results.map( ( result, index ) => { 58 | if ( result.url ) { > 59 | const url = new URL( result.url, location.href ); | ^ 60 | url.searchParams.set( 'wprov', getWprovFromResultIndex( index + offset ) ); 61 | result = Object.assign( {}, result, { url: url.toString() } ); 62 | } at location (resources/src/mediawiki.skinning.typeaheadSearch/instrumentation.js:59:37) at Array.map (<anonymous>) at Object.map [as addWprovToSearchResultUrls] (resources/src/mediawiki.skinning.typeaheadSearch/instrumentation.js:57:17) at Object.addWprovToSearchResultUrls (tests/jest/mediawiki.skinning.typeaheadSearch/instrumentation.test.js:40:27) ● instrumentation › addWprovToSearchResultUrls with offset ReferenceError: location is not defined 57 | return results.map( ( result, index ) => { 58 | if ( result.url ) { > 59 | const url = new URL( result.url, location.href ); | ^ 60 | url.searchParams.set( 'wprov', getWprovFromResultIndex( index + offset ) ); 61 | result = Object.assign( {}, result, { url: url.toString() } ); 62 | } at location (resources/src/mediawiki.skinning.typeaheadSearch/instrumentation.js:59:37) at Array.map (<anonymous>) at Object.map [as addWprovToSearchResultUrls] (resources/src/mediawiki.skinning.typeaheadSearch/instrumentation.js:57:17) at Object.addWprovToSearchResultUrls (tests/jest/mediawiki.skinning.typeaheadSearch/instrumentation.test.js:79:27) FAIL tests/qunit/resources/mediawiki.api/mediawiki.api.watch.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'mediawiki.api.watch', ( hooks ) => { | ^ 2 | let server; 3 | hooks.beforeEach( function () { 4 | server = this.sandbox.useFakeServer(); at Object.<anonymous> (tests/qunit/resources/mediawiki.api/mediawiki.api.watch.test.js:1:51) FAIL tests/jest/mediawiki.special.block/NamespacesField.test.js ● Test suite failed to run Jest encountered an unexpected token Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. By default "node_modules" folder is ignored by transformers. Here's what you can do: • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. • If you need a custom transformation specify a "transform" option in your config. • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. You'll find more details and examples of these config options in the docs: https://jestjs.io/docs/configuration For information about custom transformations, see: https://jestjs.io/docs/code-transformation Details: /src/repo/resources/src/mediawiki.special.block/SpecialBlock.vue:1 ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,jest){<template> ^ SyntaxError: Unexpected token '<' 4 | const { createTestingPinia } = require( '@pinia/testing' ); 5 | > 6 | const SpecialBlock = require( '../../../resources/src/mediawiki.special.block/SpecialBlock.vue' ); | ^ 7 | 8 | /** 9 | * Mount the SpecialBlock component with the default configuration, at Runtime.createScriptFromCode (node_modules/jest-runtime/build/index.js:1505:14) at Object.require (tests/jest/mediawiki.special.block/SpecialBlock.setup.js:6:22) at Object.require (tests/jest/mediawiki.special.block/NamespacesField.test.js:5:29) FAIL tests/qunit/resources/mediawiki.toc.test.js ● Test suite failed to run ReferenceError: QUnit is not defined 1 | ( function () { > 2 | QUnit.module( 'mediawiki.toc', { | ^ 3 | beforeEach: function () { 4 | this.getCookie = this.stub( mw.cookie, 'get' ).returns( null ); 5 | this.setCookie = this.stub( mw.cookie, 'set' ).returns( null ); at QUnit (tests/qunit/resources/mediawiki.toc.test.js:2:2) at Object.<anonymous> (tests/qunit/resources/mediawiki.toc.test.js:42:2) FAIL vendor/wikimedia/parsoid/bin/normalize.test.js ● Test suite failed to run Cannot find module './lib/utils/promise.js' from 'vendor/wikimedia/parsoid/core-upgrade.js' Require stack: vendor/wikimedia/parsoid/core-upgrade.js vendor/wikimedia/parsoid/bin/normalize.test.js 2 | 3 | // Register prfun's Promises with node-pn > 4 | var Promise = require('./lib/utils/promise.js'); | ^ 5 | require('pn/_promise')(Promise); // This only needs to be done once. 6 | 7 | // Comments below annotate the highest lts version of node for which the at Resolver._throwModNotFoundError (node_modules/jest-resolve/build/resolver.js:427:11) at Object.require (vendor/wikimedia/parsoid/core-upgrade.js:4:15) at Object.require (vendor/wikimedia/parsoid/bin/normalize.test.js:5:1) FAIL tests/qunit/resources/mediawiki.rcfilters/dm.SavedQueryItemModel.test.js ● Test suite failed to run Cannot find module 'mediawiki.rcfilters.filters.ui' from 'tests/qunit/resources/mediawiki.rcfilters/dm.SavedQueryItemModel.test.js' 1 | /* eslint-disable camelcase */ 2 | ( function () { > 3 | const rcfilters = require( 'mediawiki.rcfilters.filters.ui' ); | ^ 4 | const itemData = { 5 | params: { 6 | param1: '1', at Resolver._throwModNotFoundError (node_modules/jest-resolve/build/resolver.js:427:11) at require (tests/qunit/resources/mediawiki.rcfilters/dm.SavedQueryItemModel.test.js:3:20) at Object.<anonymous> (tests/qunit/resources/mediawiki.rcfilters/dm.SavedQueryItemModel.test.js:88:2) FAIL tests/qunit/resources/mediawiki.api/mediawiki.api.parse.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'mediawiki.api.edit', ( hooks ) => { | ^ 2 | let server; 3 | hooks.beforeEach( function () { 4 | server = this.sandbox.useFakeServer(); at Object.<anonymous> (tests/qunit/resources/mediawiki.api/mediawiki.api.parse.test.js:1:50) FAIL tests/qunit/resources/mediawiki.template.test.js ● Test suite failed to run ReferenceError: QUnit is not defined 1 | ( function () { 2 | > 3 | QUnit.module( 'mediawiki.template', { | ^ 4 | beforeEach: function () { 5 | const abcCompiler = { 6 | compile: function () { at QUnit (tests/qunit/resources/mediawiki.template.test.js:3:2) at Object.<anonymous> (tests/qunit/resources/mediawiki.template.test.js:63:2) FAIL tests/qunit/resources/mediawiki.api/mediawiki.api.messages.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'mediawiki.api.messages', ( hooks ) => { | ^ 2 | let server; 3 | hooks.beforeEach( function () { 4 | server = this.sandbox.useFakeServer(); at Object.<anonymous> (tests/qunit/resources/mediawiki.api/mediawiki.api.messages.test.js:1:54) FAIL tests/jest/mediawiki.special.block/ReasonField.test.js ● Test suite failed to run Jest encountered an unexpected token Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. By default "node_modules" folder is ignored by transformers. Here's what you can do: • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. • If you need a custom transformation specify a "transform" option in your config. • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. You'll find more details and examples of these config options in the docs: https://jestjs.io/docs/configuration For information about custom transformations, see: https://jestjs.io/docs/code-transformation Details: /src/repo/resources/src/mediawiki.special.block/components/ReasonField.vue:1 ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,jest){<template> ^ SyntaxError: Unexpected token '<' 2 | 3 | const { mount, shallowMount } = require( '@vue/test-utils' ); > 4 | const ReasonField = require( '../../../resources/src/mediawiki.special.block/components/ReasonField.vue' ); | ^ 5 | const { mockMwConfigGet } = require( './SpecialBlock.setup.js' ); 6 | 7 | describe( 'ReasonField', () => { at Runtime.createScriptFromCode (node_modules/jest-runtime/build/index.js:1505:14) at Object.require (tests/jest/mediawiki.special.block/ReasonField.test.js:4:21) FAIL tests/jest/mediawiki.special.block/BlockDetailsField.test.js ● Test suite failed to run Jest encountered an unexpected token Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. By default "node_modules" folder is ignored by transformers. Here's what you can do: • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. • If you need a custom transformation specify a "transform" option in your config. • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. You'll find more details and examples of these config options in the docs: https://jestjs.io/docs/configuration For information about custom transformations, see: https://jestjs.io/docs/code-transformation Details: /src/repo/resources/src/mediawiki.special.block/SpecialBlock.vue:1 ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,jest){<template> ^ SyntaxError: Unexpected token '<' 4 | const { createTestingPinia } = require( '@pinia/testing' ); 5 | > 6 | const SpecialBlock = require( '../../../resources/src/mediawiki.special.block/SpecialBlock.vue' ); | ^ 7 | 8 | /** 9 | * Mount the SpecialBlock component with the default configuration, at Runtime.createScriptFromCode (node_modules/jest-runtime/build/index.js:1505:14) at Object.require (tests/jest/mediawiki.special.block/SpecialBlock.setup.js:6:22) at Object.require (tests/jest/mediawiki.special.block/BlockDetailsField.test.js:5:29) FAIL tests/jest/mediawiki.special.block/init.test.js ● SpecialBlock init.js › should give the form the ID mw-block-form The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string. Consider using the "jsdom" test environment. ReferenceError: document is not defined 5 | 6 | beforeEach( () => { > 7 | document.body.innerHTML = ''; | ^ 8 | const form = document.createElement( 'form' ); 9 | form.className = 'mw-htmlform'; 10 | document.body.appendChild( form ); at Object.document (tests/jest/mediawiki.special.block/init.test.js:7:3) ● SpecialBlock init.js › should do nothing if there is no mw-htmlform The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string. Consider using the "jsdom" test environment. ReferenceError: document is not defined 5 | 6 | beforeEach( () => { > 7 | document.body.innerHTML = ''; | ^ 8 | const form = document.createElement( 'form' ); 9 | form.className = 'mw-htmlform'; 10 | document.body.appendChild( form ); at Object.document (tests/jest/mediawiki.special.block/init.test.js:7:3) FAIL tests/qunit/resources/mediawiki.experiments.test.js ● Test suite failed to run ReferenceError: mw is not defined 1 | ( function () { 2 | > 3 | const getBucket = mw.experiments.getBucket; | ^ 4 | 5 | function createExperiment() { 6 | return { at mw (tests/qunit/resources/mediawiki.experiments.test.js:3:20) at Object.<anonymous> (tests/qunit/resources/mediawiki.experiments.test.js:63:2) FAIL tests/jest/mediawiki.special.block/AdditionalDetailsField.test.js ● Test suite failed to run Jest encountered an unexpected token Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. By default "node_modules" folder is ignored by transformers. Here's what you can do: • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. • If you need a custom transformation specify a "transform" option in your config. • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. You'll find more details and examples of these config options in the docs: https://jestjs.io/docs/configuration For information about custom transformations, see: https://jestjs.io/docs/code-transformation Details: /src/repo/resources/src/mediawiki.special.block/SpecialBlock.vue:1 ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,jest){<template> ^ SyntaxError: Unexpected token '<' 4 | const { createTestingPinia } = require( '@pinia/testing' ); 5 | > 6 | const SpecialBlock = require( '../../../resources/src/mediawiki.special.block/SpecialBlock.vue' ); | ^ 7 | 8 | /** 9 | * Mount the SpecialBlock component with the default configuration, at Runtime.createScriptFromCode (node_modules/jest-runtime/build/index.js:1505:14) at Object.require (tests/jest/mediawiki.special.block/SpecialBlock.setup.js:6:22) at Object.require (tests/jest/mediawiki.special.block/AdditionalDetailsField.test.js:5:29) FAIL tests/qunit/resources/mediawiki.widgets/NamespaceInput/mediawiki.widgets.NamespaceInputWidget.test.js ● Test suite failed to run ReferenceError: QUnit is not defined 3 | */ 4 | > 5 | QUnit.module( 'mediawiki.widgets.NamespaceInputWidget' ); | ^ 6 | 7 | ( function () { 8 | const widgetA = new mw.widgets.NamespaceInputWidget( {} ); at Object.QUnit (tests/qunit/resources/mediawiki.widgets/NamespaceInput/mediawiki.widgets.NamespaceInputWidget.test.js:5:1) FAIL tests/qunit/resources/startup/jscompat.test.js ● Test suite failed to run ReferenceError: QUnit is not defined 1 | // JavaScript compatibility tests to confirm that server and browser 2 | // are behaving consistently and configured correctly. > 3 | QUnit.module( 'startup/jscompat', () => { | ^ 4 | 5 | QUnit.test( 'Unicode variable name', ( assert ) => { 6 | const ŝablono = true; at Object.QUnit (tests/qunit/resources/startup/jscompat.test.js:3:1) FAIL tests/qunit/resources/mediawiki.template.mustache.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'mediawiki.template.mustache', ( hooks ) => { | ^ 2 | 3 | hooks.beforeEach( function () { 4 | // Stub register some templates at Object.<anonymous> (tests/qunit/resources/mediawiki.template.mustache.test.js:1:59) FAIL tests/qunit/resources/mediawiki.special.block/AdditionalDetailsField.test.js ● Test suite failed to run Cannot find module 'vue-test-utils' from 'tests/qunit/resources/mediawiki.special.block/AdditionalDetailsField.test.js' > 1 | const { shallowMount } = require( 'vue-test-utils' ); | ^ 2 | const { createPinia } = require( 'pinia' ); 3 | const AdditionalDetailsField = require( 'mediawiki.special.block.codex/components/AdditionalDetailsField.vue' ); 4 | const useBlockStore = require( 'mediawiki.special.block.codex/stores/block.js' ); at Resolver._throwModNotFoundError (node_modules/jest-resolve/build/resolver.js:427:11) at Object.require (tests/qunit/resources/mediawiki.special.block/AdditionalDetailsField.test.js:1:26) FAIL tests/qunit/resources/mediawiki.messagePoster/factory.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'mediawiki.messagePoster', ( hooks ) => { | ^ 2 | const TEST_MODEL = 'test-content-model'; 3 | 4 | hooks.afterEach( () => { at Object.<anonymous> (tests/qunit/resources/mediawiki.messagePoster/factory.test.js:1:55) FAIL tests/qunit/resources/mediawiki.inspect.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'mediawiki.inspect', () => { | ^ 2 | 3 | QUnit.test( '.getModuleSize() - scripts', ( assert ) => { 4 | // Use eval so that the size doesn't change depending on minification at Object.<anonymous> (tests/qunit/resources/mediawiki.inspect.test.js:1:42) FAIL tests/qunit/resources/mediawiki.router.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'mediawiki.router', () => { | ^ 2 | const router = require( 'mediawiki.router' ); 3 | 4 | QUnit.test( 'instance', ( assert ) => { at Object.<anonymous> (tests/qunit/resources/mediawiki.router.test.js:1:41) FAIL tests/qunit/resources/mediawiki.api/mediawiki.api.upload.test.js ● Test suite failed to run ReferenceError: QUnit is not defined > 1 | QUnit.module( 'mediawiki.api.upload', () => { | ^ 2 | 3 | QUnit.test( 'Basic functionality', ( assert ) => { 4 | const api = new mw.Api(); at Object.<anonymous> (tests/qunit/resources/mediawiki.api/mediawiki.api.upload.test.js:1:45) FAIL tests/qunit/resources/jquery.tablesorter.parsers.test.js ● Test suite failed to run Your test suite must contain at least one test. at onResult (node_modules/@jest/core/build/TestScheduler.js:133:18) at node_modules/@jest/core/build/TestScheduler.js:254:19 at node_modules/emittery/index.js:363:13 at Array.map (<anonymous>) at Emittery.emit (node_modules/emittery/index.js:361:23) Test Suites: 77 failed, 1 passed, 78 total Tests: 26 failed, 8 passed, 34 total Snapshots: 0 total Time: 4.593 s Ran all test suites. --- stdout --- --- end --- Traceback (most recent call last): File "/venv/lib/python3.13/site-packages/runner/__init__.py", line 324, in npm_test self.check_call(["npm", "test"]) ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^ File "/venv/lib/python3.13/site-packages/runner/shell2.py", line 63, in check_call res.check_returncode() ~~~~~~~~~~~~~~~~~~~~^^ File "/usr/lib/python3.13/subprocess.py", line 508, in check_returncode raise CalledProcessError(self.returncode, self.args, self.stdout, self.stderr) subprocess.CalledProcessError: Command '['/usr/bin/npm', 'test']' returned non-zero exit status 1. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/venv/lib/python3.13/site-packages/runner/__init__.py", line 2030, in main libup.run(args.repo, args.output, args.branch) ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/venv/lib/python3.13/site-packages/runner/__init__.py", line 1972, in run self.npm_audit_fix(new_npm_audit) ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^ File "/venv/lib/python3.13/site-packages/runner/__init__.py", line 274, in npm_audit_fix self.npm_test() ~~~~~~~~~~~~~^^ File "/venv/lib/python3.13/site-packages/runner/__init__.py", line 329, in npm_test self.check_call(["node_modules/.bin/jest", "-u"]) ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/venv/lib/python3.13/site-packages/runner/shell2.py", line 63, in check_call res.check_returncode() ~~~~~~~~~~~~~~~~~~~~^^ File "/usr/lib/python3.13/subprocess.py", line 508, in check_returncode raise CalledProcessError(self.returncode, self.args, self.stdout, self.stderr) subprocess.CalledProcessError: Command '['node_modules/.bin/jest', '-u']' returned non-zero exit status 1.