git.iko.soy/typeable/elm-ui
on master help sign in
add some more options to the test viewer
commitc40b2076541317732679e736da056446d11d686c authorElm UI Automation <automation@elm-ui.com> dateSat 9 May 2020, 13:18 (6 years ago) parent17b3a5f
1 file changed+15−6
tests-rendering/automation/view.js+15−6
tests-rendering/automation/view.js+15−6
@@ -9,19 +9,28 @@ const http = require("http");
99
1010var filepath = null;
1111program
12−
12+ .option("--run", "run all the tests")
1313 .arguments("<filepath>")
1414 .action(function (p) {
15− filepath = p;
15+ filepath = path.join("./cases/open", p);
1616 })
1717 .parse(process.argv);
1818
1919(async () => {
20− var dir = "tmp";
21− if (!fs.existsSync(dir)) {
22− fs.mkdirSync(dir);
20+ if (filepath == null) {
21+ console.log("Open Cases");
22+ console.log("");
23+ fs.readdirSync("./tests-rendering/cases/open").forEach((file) => {
24+ if (file.endsWith("elm")) {
25+ console.log(" " + file);
26+ }
27+ });
28+ console.log("");
29+ return;
30+ }
31+ if (program.run) {
32+ filepath = "src/";
2333 }
24−
2534 console.log("Compiling tests");
2635 let content = await build.compile_to_string({
2736 template: "./tests-rendering/automation/templates/gather-styles.html",