mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-12-11 07:26:29 +00:00
15 lines
678 B
Bash
15 lines
678 B
Bash
|
#!/usr/bin/env bash
|
||
|
echo "Running QUnit tests..."
|
||
|
if command -v phantomjs > /dev/null ; then
|
||
|
URL=${MEDIAWIKI_URL:-"http://127.0.0.1:80/w/index.php/"}
|
||
|
echo "Using $URL as a development environment host."
|
||
|
echo "Please ensure \$wgEnableJavaScriptTest = true; in your LocalSettings.php"
|
||
|
echo "To specify a different host set MEDIAWIKI_URL environment variable"
|
||
|
echo '(e.g. by running "export MEDIAWIKI_URL=http://127.0.0.1:80/w/index.php/")'
|
||
|
phantomjs tests/externals/phantomjs-qunit-runner.js "${URL}Special:JavaScriptTest/qunit?filter=ext.echo"
|
||
|
else
|
||
|
echo "You need to install PhantomJS to run QUnit tests in terminal!"
|
||
|
echo "See http://phantomjs.org/"
|
||
|
exit 1
|
||
|
fi
|