as-test 0.3.1 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/README.md +3 -10
- package/assembly/__tests__/mock.spec.ts +22 -0
- package/assembly/__tests__/mock.ts +7 -0
- package/assembly/index.ts +13 -19
- package/bin/build.js +77 -65
- package/bin/index.js +161 -131
- package/bin/init.js +110 -98
- package/bin/reporter.js +1 -1
- package/bin/run.js +236 -205
- package/bin/types.js +25 -25
- package/bin/util.js +42 -35
- package/cli/index.ts +1 -1
- package/cli/init.ts +2 -3
- package/cli/run.ts +1 -1
- package/package.json +1 -1
- package/run/package.json +1 -1
- package/tests/mock.run.js +14 -0
- package/transform/lib/index.js.map +1 -1
- package/transform/lib/mock.js +76 -7
- package/transform/lib/mock.js.map +1 -1
- package/transform/package.json +1 -1
- package/transform/src/mock.ts +92 -8
package/CHANGELOG.md
CHANGED
|
@@ -25,3 +25,5 @@ v0.2.1 - Remove accidental logging
|
|
|
25
25
|
|
|
26
26
|
v0.3.0 - Pass metadata through terminal - Support for multiple files - Better reporting - Timing for suites - Terminal utilities
|
|
27
27
|
v0.3.1 - Add screenshot of completed tests to readme
|
|
28
|
+
v0.3.2 - Add `mockImport` to override imported functions
|
|
29
|
+
v0.3.3 - Allow `mockImport`'s return type to be any
|
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
| _ || __| ___|_ _|| __|| __||_ _|
|
|
4
4
|
| ||__ ||___| | | | __||__ | | |
|
|
5
5
|
|__|__||_____| |_| |_____||_____| |_|
|
|
6
|
-
v0.3.
|
|
6
|
+
v0.3.3
|
|
7
7
|
</pre>
|
|
8
8
|
</h5>
|
|
9
9
|
|
|
@@ -59,6 +59,8 @@ mockFn<void>("console.log", (data: string): void => {
|
|
|
59
59
|
console.log("[MOCKED]: " + data + "\n");
|
|
60
60
|
});
|
|
61
61
|
|
|
62
|
+
// Or override an imported function with mockImport
|
|
63
|
+
|
|
62
64
|
describe("Should sleep", () => {
|
|
63
65
|
test("1ms", () => {
|
|
64
66
|
const start = Date.now();
|
|
@@ -133,21 +135,12 @@ Build and run it using as-test
|
|
|
133
135
|
npm run test
|
|
134
136
|
```
|
|
135
137
|
|
|
136
|
-
<img src="https://raw.githubusercontent.com/JairusSW/as-test/main/assets/img/screenshot.png">
|
|
137
|
-
|
|
138
|
-
<h6>
|
|
139
|
-
|
|
140
138
|
## Running
|
|
141
139
|
|
|
142
140
|
To add `as-test` to your CI/CD workflow, check out [The provided example](https://github.com/JairusSW/as-test/blob/main/.github/workflows/nodejs.yml)
|
|
143
141
|
|
|
144
142
|
If you use this project in your codebase, consider dropping a [⭐ HERE](https://github.com/JairusSW/as-test). I would really appreciate it!
|
|
145
143
|
|
|
146
|
-
## Notes
|
|
147
|
-
|
|
148
|
-
This library is in the EARLY STAGES OF DEVELOPMENT!
|
|
149
|
-
If you want a feature, drop an issue (and again, maybe a star). I'll likely add it in less than 7 days.
|
|
150
|
-
|
|
151
144
|
## Issues
|
|
152
145
|
|
|
153
146
|
Please submit an issue to https://github.com/JairusSW/as-test/issues if you find anything wrong with this library
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { expect, it, log, mockFn, mockImport, run } from "..";
|
|
2
|
+
import { foo, getFoo } from "./mock";
|
|
3
|
+
|
|
4
|
+
// function foo(): string {
|
|
5
|
+
// return "bar";
|
|
6
|
+
// }
|
|
7
|
+
|
|
8
|
+
mockFn(foo, (): string => {
|
|
9
|
+
return "baz " + foo();
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
mockImport("mock.foo", (): string => {
|
|
13
|
+
return "biz";
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
it("should mock functions", () => {
|
|
17
|
+
log(foo());
|
|
18
|
+
expect(foo()).toBe("baz biz");
|
|
19
|
+
expect(getFoo()).toBe("biz");
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
run();
|
package/assembly/index.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { Expectation } from "./src/expectation";
|
|
|
4
4
|
import { stringify } from "as-console/stringify";
|
|
5
5
|
import { __COVER, __HASHES, __POINTS } from "as-test/assembly/coverage";
|
|
6
6
|
import { JSON } from "json-as";
|
|
7
|
-
import { term
|
|
7
|
+
import { term } from "./util/term";
|
|
8
8
|
import { Log } from "./src/log";
|
|
9
9
|
|
|
10
10
|
let entrySuites: Suite[] = [];
|
|
@@ -13,6 +13,10 @@ let entrySuites: Suite[] = [];
|
|
|
13
13
|
const FILE = isDefined(ENTRY_FILE) ? ENTRY_FILE : "unknown";
|
|
14
14
|
// Globals
|
|
15
15
|
// @ts-ignore
|
|
16
|
+
@global let __mock_global: Map<string, u32> = new Map<string, u32>();
|
|
17
|
+
// @ts-ignore
|
|
18
|
+
@global let __mock_import: Map<string, u32> = new Map<string, u32>();
|
|
19
|
+
// @ts-ignore
|
|
16
20
|
@global let suites: Suite[] = [];
|
|
17
21
|
// @ts-ignore
|
|
18
22
|
@global let depth: i32 = -1;
|
|
@@ -215,26 +219,16 @@ export function afterEach(callback: () => void): void {
|
|
|
215
219
|
}
|
|
216
220
|
|
|
217
221
|
/**
|
|
218
|
-
*
|
|
219
|
-
* @param {
|
|
220
|
-
* @param {
|
|
221
|
-
*/
|
|
222
|
-
export function mockFn<returnType>(
|
|
223
|
-
fn: string,
|
|
224
|
-
callback: (...args: any[]) => returnType,
|
|
225
|
-
): void {}
|
|
226
|
-
|
|
227
|
-
/**
|
|
228
|
-
* Unmock all references to an existing function to instead point to the original function
|
|
229
|
-
* @param {string} fn - name of function to override
|
|
222
|
+
* Replace all references to an existing function to new function
|
|
223
|
+
* @param {Function} oldFn - name of function to mock
|
|
224
|
+
* @param {Function} newFn - the function to substitute it with
|
|
230
225
|
*/
|
|
231
|
-
export function
|
|
226
|
+
export function mockFn(oldFn: Function, newFn: Function): void {}
|
|
232
227
|
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
export function remockFn(fn: string): void {}
|
|
228
|
+
export function mockImport<T extends Function>(oldFn: string, newFn: T): void {
|
|
229
|
+
__mock_import.set(oldFn, newFn.index);
|
|
230
|
+
// mocks.set(oldFn, new MockFn(oldFn, newFn).enable());
|
|
231
|
+
}
|
|
238
232
|
|
|
239
233
|
/**
|
|
240
234
|
* Class defining options that can be passed to the `run` function.
|
package/bin/build.js
CHANGED
|
@@ -7,80 +7,92 @@ import { loadConfig } from "./util.js";
|
|
|
7
7
|
const CONFIG_PATH = path.join(process.cwd(), "./as-test.config.json");
|
|
8
8
|
const PKG_PATH = path.join(process.cwd(), "./package.json");
|
|
9
9
|
export async function build() {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
10
|
+
let config = loadConfig(CONFIG_PATH, true);
|
|
11
|
+
const ASCONFIG_PATH = path.join(process.cwd(), config.config);
|
|
12
|
+
if (config.config && config.config !== "none" && !existsSync(ASCONFIG_PATH)) {
|
|
13
|
+
console.log(
|
|
14
|
+
`${chalk.bgMagentaBright(" WARN ")}${chalk.dim(":")} Could not locate asconfig.json file! If you do not want to provide a config, set "config": "none"`,
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
ensureDeps(config);
|
|
18
|
+
let pkgRunner = getPkgRunner();
|
|
19
|
+
const inputFiles = await glob(config.input);
|
|
20
|
+
let buildArgs = getBuildArgs(config);
|
|
21
|
+
for (const file of inputFiles) {
|
|
22
|
+
let cmd = `${pkgRunner} asc ${file}${buildArgs}`;
|
|
23
|
+
const outFile = `${config.outDir}/${file.slice(file.lastIndexOf("/") + 1).replace(".ts", ".wasm")}`;
|
|
24
|
+
if (config.outDir) {
|
|
25
|
+
cmd += " -o " + outFile;
|
|
26
26
|
}
|
|
27
|
+
buildFile(cmd);
|
|
28
|
+
}
|
|
27
29
|
}
|
|
28
30
|
function ensureDeps(config) {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
31
|
+
const pkg = JSON.parse(readFileSync(PKG_PATH).toString());
|
|
32
|
+
if (config.buildOptions.target == "wasi") {
|
|
33
|
+
if (!existsSync("./node_modules/@assemblyscript/wasi-shim/asconfig.json")) {
|
|
34
|
+
console.log(
|
|
35
|
+
`${chalk.bgRed(" ERROR ")}${chalk.dim(":")} could not find @assemblyscript/wasi-shim! Add it to your dependencies to run with WASI!`,
|
|
36
|
+
);
|
|
37
|
+
process.exit(1);
|
|
38
|
+
}
|
|
39
|
+
if (
|
|
40
|
+
pkg.dependencies &&
|
|
41
|
+
!Object.keys(pkg.dependencies).includes("@assemblyscript/wasi-shim") &&
|
|
42
|
+
pkg.devDependencies &&
|
|
43
|
+
!Object.keys(pkg.devDependencies).includes("@assemblyscript/wasi-shim") &&
|
|
44
|
+
pkg.peerDependencies &&
|
|
45
|
+
!Object.keys(pkg.peerDependencies).includes(
|
|
46
|
+
"@assemblyscript/wasi-shim",
|
|
47
|
+
) &&
|
|
48
|
+
existsSync("./node_modules/@assemblyscript/wasi-shim/asconfig.json")
|
|
49
|
+
) {
|
|
50
|
+
console.log(
|
|
51
|
+
`${chalk.bold.bgMagentaBright(" WARN ")}${chalk.dim(":")} @assemblyscript/wasi-shim is not included in project dependencies!"`,
|
|
52
|
+
);
|
|
44
53
|
}
|
|
54
|
+
}
|
|
45
55
|
}
|
|
46
56
|
function getPkgRunner() {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
case "bun": {
|
|
55
|
-
return "bunx";
|
|
56
|
-
}
|
|
57
|
+
switch (process.env.npm_config_user_agent) {
|
|
58
|
+
case "pnpm": {
|
|
59
|
+
return "pnpx";
|
|
60
|
+
}
|
|
61
|
+
case "yarn": {
|
|
62
|
+
return "yarn";
|
|
57
63
|
}
|
|
58
|
-
|
|
64
|
+
case "bun": {
|
|
65
|
+
return "bunx";
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return "npx";
|
|
59
69
|
}
|
|
60
70
|
function buildFile(command) {
|
|
61
|
-
|
|
71
|
+
execSync(command, { stdio: "inherit" });
|
|
62
72
|
}
|
|
63
73
|
function getBuildArgs(config) {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
74
|
+
let buildArgs = "";
|
|
75
|
+
buildArgs += " --transform as-test/transform --transform json-as/transform";
|
|
76
|
+
if (config.config && config.config !== "none") {
|
|
77
|
+
buildArgs += " --config " + config.config;
|
|
78
|
+
}
|
|
79
|
+
// Should also strip any bindings-enabling from asconfig
|
|
80
|
+
if (config.buildOptions.target == "bindings") {
|
|
81
|
+
buildArgs += " --bindings raw --exportRuntime --exportStart _start";
|
|
82
|
+
} else if (config.buildOptions.target == "wasi") {
|
|
83
|
+
buildArgs +=
|
|
84
|
+
" --config ./node_modules/@assemblyscript/wasi-shim/asconfig.json";
|
|
85
|
+
} else {
|
|
86
|
+
console.log(
|
|
87
|
+
`${chalk.bgRed(" ERROR ")}${chalk.dim(":")} could determine target in config! Set target to 'bindings' or 'wasi'`,
|
|
88
|
+
);
|
|
89
|
+
process.exit(0);
|
|
90
|
+
}
|
|
91
|
+
if (
|
|
92
|
+
config.buildOptions.args.length &&
|
|
93
|
+
config.buildOptions.args.find((v) => v.length > 0)
|
|
94
|
+
) {
|
|
95
|
+
buildArgs += " " + config.buildOptions.args.join(" ");
|
|
96
|
+
}
|
|
97
|
+
return buildArgs;
|
|
86
98
|
}
|
package/bin/index.js
CHANGED
|
@@ -7,140 +7,170 @@ const _args = process.argv.slice(2);
|
|
|
7
7
|
const flags = [];
|
|
8
8
|
const args = [];
|
|
9
9
|
const COMMANDS = ["run", "build", "test", "init"];
|
|
10
|
-
const version = "0.3.
|
|
10
|
+
const version = "0.3.3";
|
|
11
11
|
for (const arg of _args) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
else
|
|
15
|
-
args.push(arg);
|
|
12
|
+
if (arg.startsWith("-")) flags.push(arg);
|
|
13
|
+
else args.push(arg);
|
|
16
14
|
}
|
|
17
15
|
if (!args.length) {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
chalk.dim(":") +
|
|
45
|
-
" " +
|
|
46
|
-
chalk.bold("Unknown command: ") +
|
|
47
|
-
args[0]);
|
|
16
|
+
if (flags.includes("--version") || flags.includes("-v")) {
|
|
17
|
+
console.log("as-test v" + version.toString());
|
|
18
|
+
} else {
|
|
19
|
+
info();
|
|
20
|
+
}
|
|
21
|
+
} else if (COMMANDS.includes(args[0])) {
|
|
22
|
+
const command = args.shift();
|
|
23
|
+
if (command === "build") {
|
|
24
|
+
build();
|
|
25
|
+
} else if (command === "run") {
|
|
26
|
+
run();
|
|
27
|
+
} else if (command === "test") {
|
|
28
|
+
build().then(() => {
|
|
29
|
+
run();
|
|
30
|
+
});
|
|
31
|
+
} else if (command === "init") {
|
|
32
|
+
init(args);
|
|
33
|
+
}
|
|
34
|
+
} else {
|
|
35
|
+
console.log(
|
|
36
|
+
chalk.bgRed(" ERROR ") +
|
|
37
|
+
chalk.dim(":") +
|
|
38
|
+
" " +
|
|
39
|
+
chalk.bold("Unknown command: ") +
|
|
40
|
+
args[0],
|
|
41
|
+
);
|
|
48
42
|
}
|
|
49
43
|
function info() {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
"
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
"
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
44
|
+
console.log(
|
|
45
|
+
chalk.bold.blueBright("as-test") +
|
|
46
|
+
" is a testing framework for AssemblyScript. " +
|
|
47
|
+
chalk.dim("(v" + version + ")") +
|
|
48
|
+
"\n",
|
|
49
|
+
);
|
|
50
|
+
console.log(
|
|
51
|
+
chalk.bold("Usage: as-test") +
|
|
52
|
+
" " +
|
|
53
|
+
chalk.dim("<command>") +
|
|
54
|
+
" " +
|
|
55
|
+
chalk.bold.blueBright("[...flags]") +
|
|
56
|
+
" " +
|
|
57
|
+
chalk.bold("[...args]") +
|
|
58
|
+
" " +
|
|
59
|
+
chalk.dim("(alias: ast)") +
|
|
60
|
+
"\n",
|
|
61
|
+
);
|
|
62
|
+
console.log(chalk.bold("Commands:"));
|
|
63
|
+
console.log(
|
|
64
|
+
" " +
|
|
65
|
+
chalk.bold.blueBright("run") +
|
|
66
|
+
" " +
|
|
67
|
+
chalk.dim("<my-test.spec.ts>") +
|
|
68
|
+
" " +
|
|
69
|
+
"Run unit tests with selected runtime",
|
|
70
|
+
);
|
|
71
|
+
console.log(
|
|
72
|
+
" " +
|
|
73
|
+
chalk.bold.blueBright("build") +
|
|
74
|
+
" " +
|
|
75
|
+
chalk.dim("<my-test.spec.ts>") +
|
|
76
|
+
" " +
|
|
77
|
+
"Build unit tests and compile",
|
|
78
|
+
);
|
|
79
|
+
console.log(
|
|
80
|
+
" " +
|
|
81
|
+
chalk.bold.blueBright("test") +
|
|
82
|
+
" " +
|
|
83
|
+
chalk.dim("<my-test.spec.ts>") +
|
|
84
|
+
" " +
|
|
85
|
+
"Build and run unit tests with selected runtime" +
|
|
86
|
+
"\n",
|
|
87
|
+
);
|
|
88
|
+
console.log(
|
|
89
|
+
" " +
|
|
90
|
+
chalk.bold.magentaBright("init") +
|
|
91
|
+
" " +
|
|
92
|
+
chalk.strikethrough.dim("") +
|
|
93
|
+
" " +
|
|
94
|
+
"Initialize an empty testing template",
|
|
95
|
+
);
|
|
96
|
+
console.log(
|
|
97
|
+
" " +
|
|
98
|
+
chalk.strikethrough.bold.magentaBright("config") +
|
|
99
|
+
" " +
|
|
100
|
+
chalk.strikethrough.dim("as-test.config.json") +
|
|
101
|
+
" " +
|
|
102
|
+
"Specify the configuration file",
|
|
103
|
+
);
|
|
104
|
+
console.log(
|
|
105
|
+
" " +
|
|
106
|
+
chalk.strikethrough.bold.magentaBright("reporter") +
|
|
107
|
+
" " +
|
|
108
|
+
chalk.strikethrough.dim("<tap>") +
|
|
109
|
+
" " +
|
|
110
|
+
"Specify the test reporter to use",
|
|
111
|
+
);
|
|
112
|
+
console.log(
|
|
113
|
+
" " +
|
|
114
|
+
chalk.strikethrough.bold.magentaBright("use") +
|
|
115
|
+
" " +
|
|
116
|
+
chalk.strikethrough.dim("wasmtime") +
|
|
117
|
+
" " +
|
|
118
|
+
"Specify the runtime to use" +
|
|
119
|
+
"\n",
|
|
120
|
+
);
|
|
121
|
+
console.log(chalk.bold("Flags:"));
|
|
122
|
+
console.log(
|
|
123
|
+
" " +
|
|
124
|
+
chalk.strikethrough.dim("run") +
|
|
125
|
+
" " +
|
|
126
|
+
chalk.strikethrough.bold.blue("--coverage") +
|
|
127
|
+
" " +
|
|
128
|
+
"Use code coverage",
|
|
129
|
+
);
|
|
130
|
+
console.log(
|
|
131
|
+
" " +
|
|
132
|
+
chalk.strikethrough.dim("run") +
|
|
133
|
+
" " +
|
|
134
|
+
chalk.strikethrough.bold.blue("--snapshot") +
|
|
135
|
+
" " +
|
|
136
|
+
"Take a snapshot of the tests",
|
|
137
|
+
);
|
|
138
|
+
console.log(
|
|
139
|
+
" " +
|
|
140
|
+
chalk.strikethrough.dim("use") +
|
|
141
|
+
" " +
|
|
142
|
+
chalk.strikethrough.bold.blue("--list") +
|
|
143
|
+
" " +
|
|
144
|
+
"List supported runtimes",
|
|
145
|
+
);
|
|
146
|
+
console.log(
|
|
147
|
+
" " +
|
|
148
|
+
chalk.strikethrough.dim("reporter") +
|
|
149
|
+
" " +
|
|
150
|
+
chalk.strikethrough.bold.blue("--list") +
|
|
151
|
+
" " +
|
|
152
|
+
"List supported reporters",
|
|
153
|
+
);
|
|
154
|
+
console.log(
|
|
155
|
+
" " +
|
|
156
|
+
chalk.strikethrough.dim("<command>") +
|
|
157
|
+
" " +
|
|
158
|
+
chalk.strikethrough.bold.blue("--help") +
|
|
159
|
+
" " +
|
|
160
|
+
"Print info about command" +
|
|
161
|
+
"\n",
|
|
162
|
+
);
|
|
163
|
+
console.log(
|
|
164
|
+
chalk.dim(
|
|
165
|
+
"If your using this, consider dropping a star, it would help a lot!",
|
|
166
|
+
) + "\n",
|
|
167
|
+
);
|
|
168
|
+
console.log(
|
|
169
|
+
"View the repo: " +
|
|
170
|
+
chalk.magenta("https://github.com/JairusSW/as-test"),
|
|
171
|
+
);
|
|
172
|
+
console.log(
|
|
173
|
+
"View the docs: " +
|
|
174
|
+
chalk.strikethrough.blue("https://docs.jairus.dev/as-test"),
|
|
175
|
+
);
|
|
146
176
|
}
|