@iobroker/legacy-testing 0.2.1 → 0.2.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 (3) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/setup.js +4 -3
package/README.md CHANGED
@@ -11,7 +11,7 @@ Legacy test modules for ioBroker
11
11
 
12
12
  ## Changelog
13
13
  <!-- ### **WORK IN PROGRESS** -->
14
- ### 0.2.1 (2023-05-07)
14
+ ### 0.2.2 (2023-05-07)
15
15
  * (bluefox) Added possibility to install additional adapters at start
16
16
  * (bluefox) Added setOfflineState/getOfflineState
17
17
 
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.2.1",
2
+ "version": "0.2.2",
3
3
  "name": "@iobroker/legacy-testing",
4
4
  "main": "setup.js",
5
5
  "files": [
package/setup.js CHANGED
@@ -432,7 +432,8 @@ function installJsController(preInstalledAdapters, cb) {
432
432
  });
433
433
  } else {
434
434
  // check if port 9000 is free, else admin adapter will be added to running instance
435
- const client = new require('net').Socket();
435
+ const { Socket } = require('net')
436
+ const client = new Socket();
436
437
  client.on('error', () => {});
437
438
  client.connect(9000, '127.0.0.1', () => {
438
439
  console.error('Cannot initiate the first run of test, because one instance of application is running on this PC. Stop it and repeat.');
@@ -573,8 +574,8 @@ function clearDB() {
573
574
  }
574
575
  }
575
576
 
576
- function setupController(cb) {
577
- installJsController(async isInitialized => {
577
+ function setupController(preInstalledAdapters, cb) {
578
+ installJsController(preInstalledAdapters, async isInitialized => {
578
579
  try {
579
580
  clearControllerLog();
580
581
  clearDB();