as-test 1.1.5 → 1.1.7
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 +16 -1
- package/README.md +4 -9
- package/assembly/index.ts +10 -15
- package/assembly/src/expectation.ts +11 -11
- package/assembly/src/fuzz.ts +11 -7
- package/assembly/src/log.ts +2 -2
- package/assembly/src/suite.ts +5 -5
- package/assembly/src/tests.ts +8 -8
- package/assembly/util/wipc.ts +5 -1
- package/bin/build-worker-pool.js +146 -142
- package/bin/build-worker.js +37 -34
- package/bin/commands/build-core.js +577 -465
- package/bin/commands/build.js +49 -29
- package/bin/commands/clean-core.js +120 -113
- package/bin/commands/clean.js +14 -8
- package/bin/commands/doctor-core.js +288 -289
- package/bin/commands/doctor.js +1 -1
- package/bin/commands/fuzz-core.js +467 -414
- package/bin/commands/fuzz.js +27 -10
- package/bin/commands/init-core.js +905 -794
- package/bin/commands/init.js +2 -2
- package/bin/commands/run-core.js +2675 -2344
- package/bin/commands/run.js +43 -25
- package/bin/commands/test.js +56 -32
- package/bin/commands/web-runner-source.js +1 -1
- package/bin/commands/web-session.js +516 -525
- package/bin/coverage-points.js +363 -341
- package/bin/crash-store.js +56 -66
- package/bin/index.js +4092 -3150
- package/bin/reporters/default.js +1090 -890
- package/bin/reporters/tap.js +319 -325
- package/bin/types.js +67 -67
- package/bin/util.js +1290 -1239
- package/bin/wipc.js +70 -73
- package/lib/build/index.d.ts +3 -1
- package/lib/build/index.js +1039 -1034
- package/lib/build/web-runner/client.js +1 -1
- package/lib/build/web-runner/html.js +1 -1
- package/lib/build/web-runner/worker.js +1 -1
- package/package.json +6 -3
- package/transform/lib/coverage.js +4 -4
- package/transform/lib/log.js +9 -5
- package/assembly/util/json.ts +0 -112
package/bin/types.js
CHANGED
|
@@ -1,87 +1,87 @@
|
|
|
1
1
|
export class Config {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
2
|
+
constructor() {
|
|
3
|
+
this.$schema = "./as-test.config.schema.json";
|
|
4
|
+
this.input = ["./assembly/__tests__/*.spec.ts"];
|
|
5
|
+
this.outDir = "./.as-test/build";
|
|
6
|
+
this.logs = "./.as-test/logs";
|
|
7
|
+
this.coverageDir = "./.as-test/coverage";
|
|
8
|
+
this.snapshotDir = "./.as-test/snapshots";
|
|
9
|
+
this.config = "none";
|
|
10
|
+
this.coverage = false;
|
|
11
|
+
this.env = {};
|
|
12
|
+
this.buildOptions = new BuildOptions();
|
|
13
|
+
this.runOptions = new RunOptions();
|
|
14
|
+
this.fuzz = new FuzzConfig();
|
|
15
|
+
this.modes = {};
|
|
16
|
+
}
|
|
17
17
|
}
|
|
18
18
|
export class CoverageOptions {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
19
|
+
constructor() {
|
|
20
|
+
this.enabled = false;
|
|
21
|
+
this.mode = "project";
|
|
22
|
+
this.includeSpecs = false;
|
|
23
|
+
this.dependencies = [];
|
|
24
|
+
this.include = [];
|
|
25
|
+
this.exclude = [];
|
|
26
|
+
this.ignore = new CoverageIgnoreOptions();
|
|
27
|
+
}
|
|
28
28
|
}
|
|
29
29
|
export class CoverageIgnoreOptions {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
constructor() {
|
|
31
|
+
this.labels = [];
|
|
32
|
+
this.names = [];
|
|
33
|
+
this.locations = [];
|
|
34
|
+
this.snippets = [];
|
|
35
|
+
}
|
|
36
36
|
}
|
|
37
37
|
export class Suite {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
constructor() {
|
|
39
|
+
this.name = "";
|
|
40
|
+
}
|
|
41
41
|
}
|
|
42
42
|
export class BuildOptions {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
43
|
+
constructor() {
|
|
44
|
+
this.cmd = "";
|
|
45
|
+
this.args = [];
|
|
46
|
+
this.target = "wasi";
|
|
47
|
+
this.env = {};
|
|
48
|
+
}
|
|
49
49
|
}
|
|
50
50
|
export class RunOptions {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
51
|
+
constructor() {
|
|
52
|
+
this.runtime = new Runtime();
|
|
53
|
+
this.reporter = "";
|
|
54
|
+
this.env = {};
|
|
55
|
+
}
|
|
56
56
|
}
|
|
57
57
|
export class Runtime {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
58
|
+
constructor() {
|
|
59
|
+
this.cmd = "node ./.as-test/runners/default.wasi.js <file>";
|
|
60
|
+
this.browser = "";
|
|
61
|
+
}
|
|
62
62
|
}
|
|
63
63
|
export class ModeConfig {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
64
|
+
constructor() {
|
|
65
|
+
this.default = true;
|
|
66
|
+
this.config = new Config();
|
|
67
|
+
}
|
|
68
68
|
}
|
|
69
69
|
export class ReporterConfig {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
70
|
+
constructor() {
|
|
71
|
+
this.name = "";
|
|
72
|
+
this.options = [];
|
|
73
|
+
this.outDir = "";
|
|
74
|
+
this.outFile = "";
|
|
75
|
+
}
|
|
76
76
|
}
|
|
77
77
|
export class FuzzConfig {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
78
|
+
constructor() {
|
|
79
|
+
this.input = ["./assembly/__fuzz__/*.fuzz.ts"];
|
|
80
|
+
this.runs = 1000;
|
|
81
|
+
this.seed = -1;
|
|
82
|
+
this.maxInputBytes = 4096;
|
|
83
|
+
this.target = "bindings";
|
|
84
|
+
this.corpusDir = "./.as-test/fuzz/corpus";
|
|
85
|
+
this.crashDir = "./.as-test/crashes";
|
|
86
|
+
}
|
|
87
87
|
}
|