@iobroker/testing 2.5.5 → 2.5.6

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/CHANGELOG.md CHANGED
@@ -4,8 +4,11 @@
4
4
  PLACEHOLDER for next version:
5
5
  ## __WORK IN PROGRESS__
6
6
  -->
7
+ ## 2.5.6 (2022-03-05)
8
+ * Allow immediate exit with code `0` for `once` and `subscribe` adapters too
9
+
7
10
  ## 2.5.5 (2022-03-04)
8
- * Allow immediate exit with code `0` for schedule adapters
11
+ * Allow immediate exit with code `0` for `schedule` adapters
9
12
  * Check that `npm` is not listed as a local dependency in `package.json`
10
13
  * Updated dependencies
11
14
 
@@ -105,9 +105,12 @@ function testAdapter(adapterDir, options = {}) {
105
105
  var _a;
106
106
  this.timeout(60000);
107
107
  const allowedExitCodes = new Set((_a = options.allowedExitCodes) !== null && _a !== void 0 ? _a : []);
108
- // Schedule adapters are allowed to "immediately" exit with code 0
109
- if (harness.getAdapterExecutionMode() === "schedule") {
110
- allowedExitCodes.add(0);
108
+ // Adapters with these modes are allowed to "immediately" exit with code 0
109
+ switch (harness.getAdapterExecutionMode()) {
110
+ case "schedule":
111
+ case "once":
112
+ case "subscribe":
113
+ allowedExitCodes.add(0);
111
114
  }
112
115
  return new Promise((resolve, reject) => {
113
116
  // Register a handler to check the alive state and exit codes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iobroker/testing",
3
- "version": "2.5.5",
3
+ "version": "2.5.6",
4
4
  "description": "Shared utilities for adapter and module testing in ioBroker",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",