UNPKG

1.42 kBJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3const cli_helper_1 = require("./cli-helper");
4const cli_1 = require("./cli");
5function list(suite = []) {
6 cli_1.Cli.hideBanner = true;
7 if (cli_1.Cli.commandArg == 'env') {
8 cli_helper_1.printHeader();
9 cli_helper_1.printSubheader('List Environments');
10 cli_1.Cli.log('');
11 let envNames = cli_1.Cli.config.getEnvironmentNames();
12 if (envNames.length > 0) {
13 cli_1.Cli.log('Found these environments:');
14 cli_1.Cli.list(envNames);
15 cli_1.Cli.log("\n");
16 cli_1.Cli.exit(0);
17 }
18 else {
19 cli_1.Cli.log("Did not find any environments.\n");
20 cli_1.Cli.exit(2);
21 }
22 }
23 else {
24 cli_helper_1.printHeader();
25 cli_helper_1.printSubheader('List Suites');
26 cli_1.Cli.log('Looking in folder: ' + cli_1.Cli.config.getTestsFolder());
27 cli_1.Cli.log('');
28 let suiteNames = cli_1.Cli.config.getSuiteNames();
29 if (suiteNames.length > 0) {
30 cli_1.Cli.log('Found these test suites:');
31 cli_1.Cli.list(suiteNames);
32 cli_1.Cli.log("\n");
33 cli_1.Cli.exit(0);
34 }
35 else {
36 cli_1.Cli.log("Did not find any test suites.\n");
37 cli_1.Cli.exit(2);
38 }
39 }
40}
41exports.list = list;
42//# sourceMappingURL=list.js.map
\No newline at end of file