@j-o-r/sh 1.1.1 → 1.1.2

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/Test.js +4 -1
  2. package/package.json +2 -2
package/lib/Test.js CHANGED
@@ -131,6 +131,7 @@ class Test {
131
131
  const type = jsType(cb.callback);
132
132
  let error;
133
133
  try {
134
+ if (!this.#quite) process.stdout.write(`${i}. ${cb.description}\n`);
134
135
  if (type === 'Function') {
135
136
  cb.callback();
136
137
  // To settle async calls in sync functions
@@ -142,13 +143,15 @@ class Test {
142
143
  await cb.callback();
143
144
  }
144
145
  } catch (e) {
146
+ process.stdout.write(`\x1b[31mERROR: ${i}. ${cb.description}\x1b[0m\n`);
145
147
  if (!errors) {
146
148
  errors = true
147
149
  }
148
150
  error = e;
149
151
  }
150
152
  const duration = getDuration(start);
151
- if (!this.#quite) process.stdout.write(`${i}. ${cb.description} : ${duration} ms\n`);
153
+ if (!this.#quite && !error) process.stdout.write(`Finished in: ${duration} ms\n`);
154
+
152
155
  if (error) {
153
156
  this.#handleError(error);
154
157
  }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@j-o-r/sh",
3
3
  "author": "Jorrit Duin <j-o-r@duin.work>",
4
4
  "type": "module",
5
- "version": "1.1.1",
5
+ "version": "1.1.2",
6
6
  "description": "Execute shell commands on Linux-based systems from javascript",
7
7
  "main": "lib/SH.js",
8
8
  "types": "types/SH.d.ts",
@@ -49,4 +49,4 @@
49
49
  "process-promise",
50
50
  "process-output"
51
51
  ]
52
- }
52
+ }