@iobroker/legacy-testing 1.0.5 → 1.0.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.
Files changed (3) hide show
  1. package/README.md +3 -0
  2. package/package.json +1 -1
  3. package/setup.js +20 -0
package/README.md CHANGED
@@ -14,6 +14,9 @@ Set process.env.JS_CONTROLLER_VERSION to version e.g. `5.0.5-alpha.0-20230617-46
14
14
 
15
15
  ## Changelog
16
16
  <!-- ### **WORK IN PROGRESS** -->
17
+ ### 1.0.6 (2023-12-19)
18
+ * (foxriver76) allow to specify the `rootDir`
19
+
17
20
  ### 1.0.5 (2023-12-15)
18
21
  * (bluefox) Added support for vis-1 testing
19
22
 
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.0.5",
2
+ "version": "1.0.6",
3
3
  "name": "@iobroker/legacy-testing",
4
4
  "main": "setup.js",
5
5
  "files": [
package/setup.js CHANGED
@@ -548,6 +548,25 @@ function clearDB() {
548
548
  }
549
549
  }
550
550
 
551
+ /** @typedef {{ rootDir?: string }} LegacyTestingOptions */
552
+
553
+ /**
554
+ * Override options
555
+ *
556
+ * @param {LegacyTestingOptions} options specify attributes which should be overridden
557
+ */
558
+ function setOptions(options) {
559
+ if (options.rootDir) {
560
+ rootDir = options.rootDir
561
+ }
562
+ }
563
+
564
+ /**
565
+ * Install js-controller and setup the adapter
566
+ *
567
+ * @param {string[]} preInstalledAdapters list of adapters which need to be installed additionally
568
+ * @param {(systemConfig: Record<string, any>) => void} cb callback
569
+ */
551
570
  function setupController(preInstalledAdapters, cb) {
552
571
  if (typeof preInstalledAdapters === 'function') {
553
572
  cb = preInstalledAdapters;
@@ -960,4 +979,5 @@ if (typeof module !== undefined && module.parent) {
960
979
  module.exports.installCustomAdapter = installCustomAdapter;
961
980
  module.exports.getObject = getObject;
962
981
  module.exports.setObject = setObject;
982
+ module.exports.setOptions = setOptions;
963
983
  }