proby 0.2.5 → 0.3.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.
Files changed (2) hide show
  1. package/lib/run.js +21 -18
  2. package/package.json +5 -5
package/lib/run.js CHANGED
@@ -43,33 +43,36 @@ export default async (root, subrepo) => {
43
43
  return;
44
44
  }
45
45
  for (const file of files) {
46
- repository.current(file);
46
+ repository.suite(file);
47
47
  await file.import();
48
48
  }
49
49
  if (subrepo !== undefined) {
50
50
  print(`${blue(subrepo)}\n`);
51
51
  }
52
- const failed = [];
53
- for await (const test of repository.run()) {
54
- for (const result of test.results) {
55
- if (result.passed) {
56
- print(green("o"));
57
- }
58
- else {
59
- failed.push([test, result]);
60
- print(red("x"));
52
+ for (const suite of repository.next()) {
53
+ const failed = [];
54
+ for await (const test of suite.run()) {
55
+ for (const result of test.results) {
56
+ if (result.passed) {
57
+ print(green("o"));
58
+ }
59
+ else {
60
+ failed.push([test, result]);
61
+ print(red("x"));
62
+ }
61
63
  }
62
64
  }
63
- }
64
- repository.reset();
65
- if (failed.length > 0) {
66
- print("\n");
67
- for (const [test, result] of failed) {
68
- print(`${test.file.debase(root)} ${red(test.name)} \n`);
69
- print(` expected ${stringify(result.expected)}\n`);
70
- print(` actual ${stringify(result.actual)}\n`);
65
+ await suite.end();
66
+ if (failed.length > 0) {
67
+ print("\n");
68
+ for (const [test, result] of failed) {
69
+ print(`${suite.file.debase(root)} ${red(test.name)} \n`);
70
+ print(` expected ${stringify(result.expected)}\n`);
71
+ print(` actual ${stringify(result.actual)}\n`);
72
+ }
71
73
  }
72
74
  }
73
75
  print("\n");
76
+ repository.reset();
74
77
  };
75
78
  //# sourceMappingURL=run.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "proby",
3
- "version": "0.2.5",
3
+ "version": "0.3.0",
4
4
  "description": "Standard library test runner",
5
5
  "bugs": "https://github.com/rcompat/rcompat/issues",
6
6
  "license": "MIT",
@@ -16,12 +16,12 @@
16
16
  "directory": "packages/proby"
17
17
  },
18
18
  "dependencies": {
19
- "@rcompat/fs": "^0.13.2",
20
- "@rcompat/package": "^0.12.0",
21
- "@rcompat/cli": "^0.9.0"
19
+ "@rcompat/cli": "^0.9.0",
20
+ "@rcompat/fs": "^0.13.3",
21
+ "@rcompat/package": "^0.12.0"
22
22
  },
23
23
  "peerDependencies": {
24
- "@rcompat/test": "^0.3.0"
24
+ "@rcompat/test": "^0.4.0"
25
25
  },
26
26
  "peerDependenciesMeta": {
27
27
  "@rcompat/test": {