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.
Files changed (43) hide show
  1. package/CHANGELOG.md +16 -1
  2. package/README.md +4 -9
  3. package/assembly/index.ts +10 -15
  4. package/assembly/src/expectation.ts +11 -11
  5. package/assembly/src/fuzz.ts +11 -7
  6. package/assembly/src/log.ts +2 -2
  7. package/assembly/src/suite.ts +5 -5
  8. package/assembly/src/tests.ts +8 -8
  9. package/assembly/util/wipc.ts +5 -1
  10. package/bin/build-worker-pool.js +146 -142
  11. package/bin/build-worker.js +37 -34
  12. package/bin/commands/build-core.js +577 -465
  13. package/bin/commands/build.js +49 -29
  14. package/bin/commands/clean-core.js +120 -113
  15. package/bin/commands/clean.js +14 -8
  16. package/bin/commands/doctor-core.js +288 -289
  17. package/bin/commands/doctor.js +1 -1
  18. package/bin/commands/fuzz-core.js +467 -414
  19. package/bin/commands/fuzz.js +27 -10
  20. package/bin/commands/init-core.js +905 -794
  21. package/bin/commands/init.js +2 -2
  22. package/bin/commands/run-core.js +2675 -2344
  23. package/bin/commands/run.js +43 -25
  24. package/bin/commands/test.js +56 -32
  25. package/bin/commands/web-runner-source.js +1 -1
  26. package/bin/commands/web-session.js +516 -525
  27. package/bin/coverage-points.js +363 -341
  28. package/bin/crash-store.js +56 -66
  29. package/bin/index.js +4092 -3150
  30. package/bin/reporters/default.js +1090 -890
  31. package/bin/reporters/tap.js +319 -325
  32. package/bin/types.js +67 -67
  33. package/bin/util.js +1290 -1239
  34. package/bin/wipc.js +70 -73
  35. package/lib/build/index.d.ts +3 -1
  36. package/lib/build/index.js +1039 -1034
  37. package/lib/build/web-runner/client.js +1 -1
  38. package/lib/build/web-runner/html.js +1 -1
  39. package/lib/build/web-runner/worker.js +1 -1
  40. package/package.json +6 -3
  41. package/transform/lib/coverage.js +4 -4
  42. package/transform/lib/log.js +9 -5
  43. package/assembly/util/json.ts +0 -112
package/bin/types.js CHANGED
@@ -1,87 +1,87 @@
1
1
  export class Config {
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
- }
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
- 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
- }
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
- constructor() {
31
- this.labels = [];
32
- this.names = [];
33
- this.locations = [];
34
- this.snippets = [];
35
- }
30
+ constructor() {
31
+ this.labels = [];
32
+ this.names = [];
33
+ this.locations = [];
34
+ this.snippets = [];
35
+ }
36
36
  }
37
37
  export class Suite {
38
- constructor() {
39
- this.name = "";
40
- }
38
+ constructor() {
39
+ this.name = "";
40
+ }
41
41
  }
42
42
  export class BuildOptions {
43
- constructor() {
44
- this.cmd = "";
45
- this.args = [];
46
- this.target = "wasi";
47
- this.env = {};
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
- constructor() {
52
- this.runtime = new Runtime();
53
- this.reporter = "";
54
- this.env = {};
55
- }
51
+ constructor() {
52
+ this.runtime = new Runtime();
53
+ this.reporter = "";
54
+ this.env = {};
55
+ }
56
56
  }
57
57
  export class Runtime {
58
- constructor() {
59
- this.cmd = "node ./.as-test/runners/default.wasi.js <file>";
60
- this.browser = "";
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
- constructor() {
65
- this.default = true;
66
- this.config = new Config();
67
- }
64
+ constructor() {
65
+ this.default = true;
66
+ this.config = new Config();
67
+ }
68
68
  }
69
69
  export class ReporterConfig {
70
- constructor() {
71
- this.name = "";
72
- this.options = [];
73
- this.outDir = "";
74
- this.outFile = "";
75
- }
70
+ constructor() {
71
+ this.name = "";
72
+ this.options = [];
73
+ this.outDir = "";
74
+ this.outFile = "";
75
+ }
76
76
  }
77
77
  export class FuzzConfig {
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
- }
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
  }