Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Unified Diff: lib/src/prism/tests/run.js

Issue 1418513006: update elements and fix some bugs (Closed) Base URL: git@github.com:dart-lang/polymer_elements.git@master
Patch Set: code review updates Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/src/prism/tests/languages/yaml/tag_feature.test ('k') | lib/src/prism/tests/testrunner-tests.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/prism/tests/run.js
diff --git a/lib/src/prism/tests/run.js b/lib/src/prism/tests/run.js
new file mode 100644
index 0000000000000000000000000000000000000000..a28350d2a45bf9c0e1f72909ef19479cf5572320
--- /dev/null
+++ b/lib/src/prism/tests/run.js
@@ -0,0 +1,37 @@
+"use strict";
+
+var TestDiscovery = require("./helper/test-discovery");
+var TestCase = require("./helper/test-case");
+var path = require("path");
+var argv = require("yargs").argv;
+
+var testSuite;
+if (argv.language) {
+ testSuite = TestDiscovery.loadSomeTests(__dirname + "/languages", argv.language);
+} else {
+ // load complete test suite
+ testSuite = TestDiscovery.loadAllTests(__dirname + "/languages");
+}
+
+// define tests for all tests in all languages in the test suite
+for (var language in testSuite) {
+ if (!testSuite.hasOwnProperty(language)) {
+ continue;
+ }
+
+ (function (language, testFiles) {
+ describe("Testing language '" + language + "'", function () {
+ testFiles.forEach(
+ function (filePath) {
+ var fileName = path.basename(filePath, path.extname(filePath));
+
+ it("– should pass test case '" + fileName + "'",
+ function () {
+ TestCase.runTestCase(language, filePath);
+ }
+ );
+ }
+ );
+ });
+ })(language, testSuite[language]);
+}
« no previous file with comments | « lib/src/prism/tests/languages/yaml/tag_feature.test ('k') | lib/src/prism/tests/testrunner-tests.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698