@j-o-r/sh 1.1.3 → 1.1.4

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/lib/Test.js CHANGED
@@ -103,6 +103,7 @@ class Test {
103
103
  * @param {string} description
104
104
  * @param {Function|AsyncFunction} callback - sync / async function
105
105
  * @throws Error when conditions are not met
106
+ * @returns {Test}
106
107
  */
107
108
  add(description, callback) {
108
109
  if (jsType(description) !== 'String') {
@@ -112,6 +113,7 @@ class Test {
112
113
  throw new Error(`'callback' should be a (async) Function`)
113
114
  }
114
115
  this.#tests.push({ description, callback });
116
+ return this;
115
117
  }
116
118
  /**
117
119
  * Execute tests
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.3",
5
+ "version": "1.1.4",
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",
package/types/Test.d.ts CHANGED
@@ -50,8 +50,9 @@ declare class Test {
50
50
  * @param {string} description
51
51
  * @param {Function|AsyncFunction} callback - sync / async function
52
52
  * @throws Error when conditions are not met
53
+ * @returns {Test}
53
54
  */
54
- add(description: string, callback: Function | AsyncFunction): void;
55
+ add(description: string, callback: Function | AsyncFunction): Test;
55
56
  /**
56
57
  * Execute tests
57
58
  * @param {number[]} [execute] - limit the execution tests