New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@iobroker/testing

Package Overview
Dependencies
Maintainers
5
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@iobroker/testing - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

15

build/lib/adapterTools.js

@@ -10,2 +10,5 @@ "use strict";

};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
var __importStar = (this && this.__importStar) || function (mod) {

@@ -19,2 +22,5 @@ if (mod && mod.__esModule) return mod;

Object.defineProperty(exports, "__esModule", { value: true });
// Add debug logging for tests
const debug_1 = __importDefault(require("debug"));
const debug = debug_1.default("testing:unit:adapterTools");
// tslint:disable:unified-signatures

@@ -51,2 +57,3 @@ const fs_extra_1 = require("fs-extra");

return __awaiter(this, void 0, void 0, function* () {
debug(`locating adapter main file in ${adapterDir}...`);
const ioPackage = loadIoPackage(adapterDir);

@@ -58,8 +65,12 @@ // First look for the file defined in io-package.json or use "main.js" as a fallback

let ret = path.join(adapterDir, mainFile);
if (yield fs_extra_1.pathExists(ret))
if (yield fs_extra_1.pathExists(ret)) {
debug(` => found ${mainFile}`);
return ret;
}
// If both don't exist, JS-Controller uses <adapter name>.js as another fallback
ret = path.join(adapterDir, ioPackage.name + ".js");
if (yield fs_extra_1.pathExists(ret))
if (yield fs_extra_1.pathExists(ret)) {
debug(` => found ${mainFile}`);
return ret;
}
throw new Error(`The adapter main file was not found in ${adapterDir}`);

@@ -66,0 +77,0 @@ });

14

build/tests/integration/lib/adapterSetup.js

@@ -10,2 +10,5 @@ "use strict";

};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
var __importStar = (this && this.__importStar) || function (mod) {

@@ -18,6 +21,6 @@ if (mod && mod.__esModule) return mod;

};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
// Add debug logging for tests
const debug_1 = __importDefault(require("debug"));
const debug = debug_1.default("testing:integration:AdapterSetup");
const fs_extra_1 = require("fs-extra");

@@ -28,5 +31,2 @@ const path = __importStar(require("path"));

const tools_1 = require("./tools");
// Add debug logging for tests
const debug_1 = __importDefault(require("debug"));
const debug = debug_1.default("testing:integration:AdapterSetup");
class AdapterSetup {

@@ -71,3 +71,3 @@ constructor(adapterDir, testDir, dbConnection) {

const tarballPath = path.resolve(this.adapterDir, tarballName);
yield fs_extra_1.copy(tarballPath, path.resolve(this.testDir, tarballName));
yield fs_extra_1.copy(tarballPath, path.resolve(this.testDir, Date.now() + "-" + tarballName));
yield fs_extra_1.unlink(tarballPath);

@@ -74,0 +74,0 @@ // Complete the package.json, so npm can do it's magic

{
"name": "@iobroker/testing",
"version": "1.0.1",
"version": "1.0.2",
"description": "Shared utilities for adapter and module testing in ioBroker",

@@ -5,0 +5,0 @@ "main": "build/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc