@rcompat/test 0.19.1 → 0.20.0

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.
@@ -9,7 +9,10 @@ export default class Suite {
9
9
  ended(end: End): void;
10
10
  get file(): FileRef;
11
11
  between(fn: () => void): void;
12
- run(): AsyncGenerator<Test, void, unknown>;
12
+ run(): AsyncGenerator<{
13
+ test: Test;
14
+ duration: number;
15
+ }, void, unknown>;
13
16
  end(): Promise<void>;
14
17
  }
15
18
  //# sourceMappingURL=Suite.d.ts.map
@@ -21,7 +21,10 @@ export default class Suite {
21
21
  }
22
22
  async *run() {
23
23
  for (const test of this.#tests) {
24
- yield await test.run();
24
+ const start = performance.now();
25
+ const result = await test.run();
26
+ const duration = performance.now() - start;
27
+ yield { test: result, duration };
25
28
  for (const fn of this.#between) {
26
29
  fn();
27
30
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rcompat/test",
3
- "version": "0.19.1",
3
+ "version": "0.20.0",
4
4
  "description": "Standard library testing",
5
5
  "bugs": "https://github.com/rcompat/rcompat/issues",
6
6
  "license": "MIT",