as-test 0.1.2 → 0.1.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/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  | _ || __| ___|_ _|| __|| __||_ _|
4
4
  | ||__ ||___| | | | __||__ | | |
5
5
  |__|__||_____| |_| |_____||_____| |_|
6
- v0.1.1
6
+ v0.1.3
7
7
  </pre>
8
8
  </h5>
9
9
 
@@ -135,7 +135,7 @@ Tests: 0 failed, 8 total
135
135
  Coverage: 0 failed, 23 total
136
136
  Snapshots: 0 total
137
137
  Time: 101.812μs
138
- </pre>
138
+ </pre>z
139
139
  </h6>
140
140
 
141
141
  ## Running
package/assembly/index.ts CHANGED
@@ -3,7 +3,8 @@ import { TestGroup } from "./src/group";
3
3
  import { Expectation } from "./src/expectation";
4
4
  import { formatTime } from "./util";
5
5
  import { stringify } from "as-console/assembly";
6
- import { __COVER, __HASHES, __POINTS } from "as-test/assembly/coverage";
6
+ import { CoverPoint, __COVER, __HASHES, __POINTS } from "as-test/assembly/coverage";
7
+ import { createTable } from "table-as";
7
8
 
8
9
  /**
9
10
  * Enumeration representing the verdict of a test case.
@@ -213,7 +214,7 @@ export function run(options: RunOptions = new RunOptions()): void {
213
214
  console.log(rainbow.boldMk(rainbow.blueBright(`| _ || __| ___|_ _|| __|| __||_ _|`)));
214
215
  console.log(rainbow.boldMk(rainbow.blueBright(`| ||__ ||___| | | | __||__ | | | `)));
215
216
  console.log(rainbow.boldMk(rainbow.blueBright(`|__|__||_____| |_| |_____||_____| |_| `)));
216
- console.log(rainbow.dimMk("\n------------------- v0.1.1 -------------------\n"));
217
+ console.log(rainbow.dimMk("\n------------------- v0.1.3 -------------------\n"));
217
218
  if (options.coverage) {
218
219
  console.log(rainbow.bgBlueBright(" PLUGIN ") + " " + rainbow.dimMk("Using Code Coverage") + "\n");
219
220
  }
@@ -268,11 +269,19 @@ export function run(options: RunOptions = new RunOptions()): void {
268
269
  console.log(rainbow.dimMk("----------------- [COVERAGE] -----------------\n"));
269
270
  const points = __HASHES().values();
270
271
 
272
+ const table: string[][] = [
273
+ ["Location", "Type", "Hash"]
274
+ ];
275
+
271
276
  for (let i = 0; i < points.length; i++) {
272
277
  const point = unchecked(points[i]);
273
- console.log(rainbow.bgRed(" UNCOVERED ") + " " + point.type + " at " + point.file + ":" + point.line.toString() + ":" + point.column.toString());
278
+ const file = point.file;
279
+ const reference = point.file + ":" + point.line.toString() + ":" + point.column.toString();
280
+ const type = point.type;
281
+ const hash = point.hash;
282
+ table.push([rainbow.underlineMk(reference), type, "#" + hash]);
274
283
  }
275
- console.log("");
284
+ console.log(rainbow.dimMk(createTable(table)) + "\n");
276
285
  }
277
286
 
278
287
  console.log(rainbow.dimMk("----------------- [RESULTS] ------------------\n"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "as-test",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Testing framework for AssemblyScript. Compatible with WASI or Bindings ",
5
5
  "types": "assembly/index.ts",
6
6
  "author": "Jairus Tanaka",
@@ -30,7 +30,8 @@
30
30
  "as-string-sink": "^0.5.3",
31
31
  "as-variant": "^0.4.1",
32
32
  "chalk": "^5.3.0",
33
- "micromatch": "^4.0.7"
33
+ "micromatch": "^4.0.7",
34
+ "table-as": "^1.0.1"
34
35
  },
35
36
  "overrides": {
36
37
  "assemblyscript": "$assemblyscript",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@as-test/transform",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Testing framework for AssemblyScript. Compatible with WASI or Bindings ",
5
5
  "main": "./lib/index.js",
6
6
  "author": "Jairus Tanaka",