diff --git a/modules/parser/package.json b/modules/parser/package.json index 3bf514a82..6bc3cba6e 100644 --- a/modules/parser/package.json +++ b/modules/parser/package.json @@ -1,30 +1,30 @@ { "name": "mediawiki-parsoid", "description": "Mediawiki parser for the VisualEditor.", "version": "0.0.1", "dependencies": { "events": "0.x.x", "jquery": "1.x.x", "request": "2.x.x", "querystring": "0.x.x", "path": "0.x.x", "jshashes": "0.x.x", "optimist": "0.x.x", "assert": "0.x.x", "jsdom": "0.x.x", "pegjs": "0.x.x", "lru-cache": "1.x.x", "async": "0.x.x", "express": "2.5.x" }, "devDependencies": { "colors": "0.x.x", "diff": "1.x.x", "html5": "0.x.x" }, "main": "mediawiki.parser.js", "scripts": { - "pretest": "node ../../tests/parser/fetch-parserTests.txt.js", - "test": "node ../../tests/parser/parserTests.js" + "pretest": "node test/fetch-parserTests.txt.js", + "test": "node test/parserTests.js" } } diff --git a/tests/parser/COPYING b/modules/parser/test/COPYING similarity index 100% rename from tests/parser/COPYING rename to modules/parser/test/COPYING diff --git a/tests/parser/README b/modules/parser/test/README similarity index 89% rename from tests/parser/README rename to modules/parser/test/README index 1e3c803cd..73bdc55bb 100644 --- a/tests/parser/README +++ b/modules/parser/test/README @@ -1,29 +1,28 @@ Work in progress. :) Please see https://www.mediawiki.org/wiki/Parsoid for some information on how to get started with these tests and the current parser architecture. Install dependencies and run tests: -cd modules/parser -(cd ../../modules/parser if you are in this README file's directory) +(cd .. if you are in this README file's directory) npm test == Running parserTests.js == For parserTests, you also need MediaWiki's parser test cases (parserTests.txt). 'npm test' from the modules directory automatically fetches the current version to this directory. You can also specify a test case file as an argument. You can also symlink parserTests.txt from a core git checkout. node ./parserTests.js Several options are available for parserTests: node ./parserTests.js --help Example for round-trip testing: node ./parserTests.js --roundtrip Enjoy! diff --git a/tests/parser/dumpGrepPatterns/martian-endtags.sh b/modules/parser/test/dumpGrepPatterns/martian-endtags.sh similarity index 100% rename from tests/parser/dumpGrepPatterns/martian-endtags.sh rename to modules/parser/test/dumpGrepPatterns/martian-endtags.sh diff --git a/tests/parser/dumpGrepPatterns/misc.txt b/modules/parser/test/dumpGrepPatterns/misc.txt similarity index 100% rename from tests/parser/dumpGrepPatterns/misc.txt rename to modules/parser/test/dumpGrepPatterns/misc.txt diff --git a/tests/parser/dumpGrepper.js b/modules/parser/test/dumpGrepper.js similarity index 100% rename from tests/parser/dumpGrepper.js rename to modules/parser/test/dumpGrepper.js diff --git a/tests/parser/dumpReader.js b/modules/parser/test/dumpReader.js similarity index 100% rename from tests/parser/dumpReader.js rename to modules/parser/test/dumpReader.js diff --git a/tests/parser/expansionTest.js b/modules/parser/test/expansionTest.js similarity index 100% rename from tests/parser/expansionTest.js rename to modules/parser/test/expansionTest.js diff --git a/tests/parser/fetch-parserTests.txt.js b/modules/parser/test/fetch-parserTests.txt.js similarity index 100% rename from tests/parser/fetch-parserTests.txt.js rename to modules/parser/test/fetch-parserTests.txt.js diff --git a/tests/parser/package.json b/modules/parser/test/package.json similarity index 100% rename from tests/parser/package.json rename to modules/parser/test/package.json diff --git a/tests/parser/parserTests-whitelist.js b/modules/parser/test/parserTests-whitelist.js similarity index 100% rename from tests/parser/parserTests-whitelist.js rename to modules/parser/test/parserTests-whitelist.js diff --git a/tests/parser/parserTests.js b/modules/parser/test/parserTests.js similarity index 100% rename from tests/parser/parserTests.js rename to modules/parser/test/parserTests.js diff --git a/tests/parser/parserTests.pegjs b/modules/parser/test/parserTests.pegjs similarity index 100% rename from tests/parser/parserTests.pegjs rename to modules/parser/test/parserTests.pegjs diff --git a/tests/parser/parsoid.js b/modules/parser/test/parsoid.js similarity index 100% rename from tests/parser/parsoid.js rename to modules/parser/test/parsoid.js diff --git a/tests/parser/roundtrip-test.js b/modules/parser/test/roundtrip-test.js similarity index 100% rename from tests/parser/roundtrip-test.js rename to modules/parser/test/roundtrip-test.js diff --git a/tests/parser/roundtrip.js b/modules/parser/test/roundtrip.js similarity index 100% rename from tests/parser/roundtrip.js rename to modules/parser/test/roundtrip.js diff --git a/tests/parser/runtests.sh b/modules/parser/test/runtests.sh similarity index 100% rename from tests/parser/runtests.sh rename to modules/parser/test/runtests.sh diff --git a/tests/parser/specs.js b/modules/parser/test/specs.js similarity index 100% rename from tests/parser/specs.js rename to modules/parser/test/specs.js diff --git a/tests/parser/specs/headings.spec.js b/modules/parser/test/specs/headings.spec.js similarity index 100% rename from tests/parser/specs/headings.spec.js rename to modules/parser/test/specs/headings.spec.js diff --git a/tests/parser/tests.html b/modules/parser/test/tests.html similarity index 100% rename from tests/parser/tests.html rename to modules/parser/test/tests.html diff --git a/tests/parser/wikia-rte-roundtrip-tests.xml b/modules/parser/test/wikia-rte-roundtrip-tests.xml similarity index 100% rename from tests/parser/wikia-rte-roundtrip-tests.xml rename to modules/parser/test/wikia-rte-roundtrip-tests.xml diff --git a/tests/parser/worker.js b/modules/parser/test/worker.js similarity index 100% rename from tests/parser/worker.js rename to modules/parser/test/worker.js