MediaWiki extension GenerateMochaConfig

Clone this repo:
  1. 519aea1 build: Updating cross-spawn to 7.0.6 by libraryupgrader · 6 weeks ago master
  2. 5071847 build: Updating mediawiki/mediawiki-codesniffer to 45.0.0 by libraryupgrader · 9 weeks ago
  3. 51aef33 build: Updating micromatch to 4.0.8 by libraryupgrader · 5 months ago
  4. 5402721 build: Updating mediawiki/mediawiki-codesniffer to 44.0.0 by libraryupgrader · 5 months ago
  5. 3ede4d7 build: Updating eslint-config-wikimedia to 0.28.2 by libraryupgrader · 7 months ago

MediaWiki extension: GenerateMochaConfig

GenerateMochaConfig is a MediaWiki maintenance extension that generates a JSON that can be used to run Mocha tests for all enabled extensions with a tests/mocha directory.

To enable it, first download a copy of the GenerateMochaConfig directory and put it into your extensions directory. Then put the following at the end of your LocalSettings.php:

wfLoadExtension ( 'GenerateMochaConfig' );

Usage

To get a Mocha configuration JSON for all enabled extensions run:

$ php extensions/GenerateMochaConfig/maintenance/generateMochaConfig.php

To merge the Mocha configuration JSON with an existing mocharc.json file run:

$ php extensions/GenerateMochaConfig/maintenance/generateMochaConfig.php --config <filename>
  NODES
os 1