Skip to content

Commit a2d0d01

Browse files
committed
Formatting
1 parent 847b6b0 commit a2d0d01

File tree

9 files changed

+21
-21
lines changed

9 files changed

+21
-21
lines changed

build/tests/integration/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ var __importStar = (this && this.__importStar) || (function () {
3434
})();
3535
Object.defineProperty(exports, "__esModule", { value: true });
3636
exports.testAdapter = testAdapter;
37-
const os = __importStar(require("os"));
38-
const path = __importStar(require("path"));
37+
const os = __importStar(require("node:os"));
38+
const path = __importStar(require("node:path"));
3939
const adapterTools_1 = require("../../lib/adapterTools");
4040
const adapterSetup_1 = require("./lib/adapterSetup");
4141
const controllerSetup_1 = require("./lib/controllerSetup");
@@ -66,7 +66,7 @@ function testAdapter(adapterDir, options = {}) {
6666
const adapterSetup = new adapterSetup_1.AdapterSetup(adapterDir, testDir);
6767
// Installation happens in two steps:
6868
// First we need to set up JS Controller, so the databases etc. can be created
69-
// First we need to copy all files and execute an npm install
69+
// First, we need to copy all files and execute a `npm install`
7070
await controllerSetup.prepareTestDir(options.controllerVersion);
7171
// Only then we can install the adapter, because some (including VIS) try to access
7272
// the databases if JS Controller is installed
@@ -178,7 +178,7 @@ function testAdapter(adapterDir, options = {}) {
178178
describe('User-defined tests', () => {
179179
// patch the global it() function so nobody can bypass the checks
180180
global.it = patchedIt;
181-
// a test suite is a special describe which sets up and tears down the test environment before and after ALL tests
181+
// a test suite is a special `describe`, which sets up and tears down the test environment before and after ALL tests
182182
const suiteBody = (fn) => {
183183
isInSuite = true;
184184
before(resetDbAndStartHarness);

build/tests/integration/lib/dbConnection.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import EventEmitter from 'events';
1+
import EventEmitter from 'node:events';
22
export type ObjectsDB = Record<string, ioBroker.Object>;
33
export type StatesDB = Record<string, ioBroker.State>;
44
export interface DBConnection {

build/tests/integration/lib/dbConnection.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3838
Object.defineProperty(exports, "__esModule", { value: true });
3939
exports.DBConnection = void 0;
4040
const debug_1 = __importDefault(require("debug"));
41-
const events_1 = __importDefault(require("events"));
41+
const node_events_1 = __importDefault(require("node:events"));
4242
const fs_extra_1 = require("fs-extra");
43-
const path = __importStar(require("path"));
43+
const path = __importStar(require("node:path"));
4444
const tools_1 = require("./tools");
4545
const debug = (0, debug_1.default)('testing:integration:DBConnection');
4646
/** The DB connection capsules access to the states and objects DB */
47-
class DBConnection extends events_1.default {
47+
class DBConnection extends node_events_1.default {
4848
/**
4949
* @param appName The branded name of "iobroker"
5050
* @param testDir The directory the integration tests are executed in

src/tests/integration/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import * as os from 'os';
2-
import * as path from 'path';
1+
import * as os from 'node:os';
2+
import * as path from 'node:path';
33
import { getAdapterName, getAppName } from '../../lib/adapterTools';
44
import { AdapterSetup } from './lib/adapterSetup';
55
import { ControllerSetup } from './lib/controllerSetup';
@@ -79,7 +79,7 @@ export function testAdapter(adapterDir: string, options: TestAdapterOptions = {}
7979
// Installation happens in two steps:
8080
// First we need to set up JS Controller, so the databases etc. can be created
8181

82-
// First we need to copy all files and execute an npm install
82+
// First, we need to copy all files and execute a `npm install`
8383
await controllerSetup.prepareTestDir(options.controllerVersion);
8484
// Only then we can install the adapter, because some (including VIS) try to access
8585
// the databases if JS Controller is installed
@@ -226,7 +226,7 @@ export function testAdapter(adapterDir: string, options: TestAdapterOptions = {}
226226
// patch the global it() function so nobody can bypass the checks
227227
global.it = patchedIt;
228228

229-
// a test suite is a special describe which sets up and tears down the test environment before and after ALL tests
229+
// a test suite is a special `describe`, which sets up and tears down the test environment before and after ALL tests
230230
const suiteBody = (fn: (getHarness: () => TestHarness) => void): void => {
231231
isInSuite = true;
232232
before(resetDbAndStartHarness);

src/tests/integration/lib/adapterSetup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Add debug logging for tests
22
import debugModule from 'debug';
33
import { copy, pathExists, readJSON, remove, unlink, writeJSON } from 'fs-extra';
4-
import * as path from 'path';
4+
import * as path from 'node:path';
55
import { getAdapterDependencies, getAdapterFullName, getAdapterName, getAppName } from '../../../lib/adapterTools';
66
import { executeCommand } from '../../../lib/executeCommand';
77
import type { DBConnection } from './dbConnection';

src/tests/integration/lib/controllerSetup.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// Add debug logging for tests
22
import debugModule from 'debug';
33
import { emptyDir, ensureDir, pathExists, unlink, writeFile, writeJSON } from 'fs-extra';
4-
import { Socket } from 'net';
5-
import * as path from 'path';
4+
import { Socket } from 'node:net';
5+
import * as path from 'node:path';
66
import { getAdapterName, getAppName } from '../../../lib/adapterTools';
77
import { executeCommand } from '../../../lib/executeCommand';
88
import type { DBConnection } from './dbConnection';

src/tests/integration/lib/dbConnection.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import debugModule from 'debug';
2-
import EventEmitter from 'events';
2+
import EventEmitter from 'node:events';
33
import { readFile, readJSONSync, writeFile, writeJSONSync } from 'fs-extra';
4-
import * as path from 'path';
4+
import * as path from 'node:path';
55
import { getTestControllerDir, getTestDataDir } from './tools';
66

77
const debug = debugModule('testing:integration:DBConnection');

src/tests/integration/lib/harness.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { wait } from 'alcalzone-shared/async';
22
import { extend } from 'alcalzone-shared/objects';
3-
import { type ChildProcess, spawn } from 'child_process';
3+
import { type ChildProcess, spawn } from 'node:child_process';
44
import debugModule from 'debug';
5-
import { EventEmitter } from 'events';
6-
import * as path from 'path';
5+
import { EventEmitter } from 'node:events';
6+
import * as path from 'node:path';
77
import { getAdapterExecutionMode, getAdapterName, getAppName, locateAdapterMainFile } from '../../../lib/adapterTools';
88
import type { DBConnection } from './dbConnection';
99
import { getTestAdapterDir, getTestControllerDir } from './tools';

src/tests/integration/lib/tools.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as path from 'path';
1+
import * as path from 'node:path';
22
import { getAdapterFullName } from '../../../lib/adapterTools';
33

44
/**

0 commit comments

Comments
 (0)