browser-ava 1.1.0 → 1.2.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "browser-ava",
3
- "version": "1.1.0",
3
+ "version": "1.2.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -172,6 +172,9 @@ async function runTest(parent, tm, test) {
172
172
  test.passed = false;
173
173
  test.message = e;
174
174
  }
175
+ finally {
176
+ ws.send(stringify({ action: "update", data: test }));
177
+ }
175
178
  }
176
179
  }
177
180
 
@@ -58,7 +58,6 @@ program
58
58
  .argument("<tests...>")
59
59
  .action(async (tests, options) => {
60
60
  if (options.browser) {
61
-
62
61
  const parts = options.browser.split(/:/);
63
62
  if (parts.length > 1) {
64
63
  if (parts[1] === "headless") {
@@ -113,6 +112,22 @@ program
113
112
  case "ready":
114
113
  ws.send(JSON.stringify({ action: "run" }));
115
114
  break;
115
+
116
+ case "update":
117
+ if (data.data.skip) {
118
+ console.log(" ", chalk.yellow("- [skip] " + data.data.title));
119
+ } else {
120
+ if (data.data.todo) {
121
+ } else {
122
+ if (data.data.passed === true) {
123
+ console.log(" ", chalk.green("✔"), data.data.title);
124
+ } else {
125
+ console.log(" ", chalk.red("✘ [fail]: "), data.data.title);
126
+ }
127
+ }
128
+ }
129
+ break;
130
+
116
131
  case "result":
117
132
  const summary = calculateSummary(data.data);
118
133