import type { MockController, MockControllerOptions, MockNode, MockNodeOptions } from "@zwave-js/testing"; import type net from "node:net"; import { type TestContext } from "vitest"; import type { Driver } from "../driver/Driver.js"; import type { PartialZWaveOptions } from "../driver/ZWaveOptions.js"; import type { ZWaveNode } from "../node/Node.js"; interface IntegrationTestOptions { /** Enable debugging for this integration tests. When enabled, a driver logfile will be written and the test directory will not be deleted after each test. Default: false */ debug?: boolean; /** If given, the files from this directory will be copied into the test cache directory prior to starting the driver. */ provisioningDirectory?: string; /** Whether the recorded messages and frames should be cleared before executing the test body. Default: true. */ clearMessageStatsBeforeTest?: boolean; /** Whether the driver should connect to the mock controller through an actual TCP connection. This allows testing reconnection scenarios with real network errors. Default: false */ connectViaTCP?: boolean; controllerCapabilities?: MockControllerOptions["capabilities"]; nodeCapabilities?: MockNodeOptions["capabilities"]; customSetup?: (driver: Driver, mockController: MockController, mockNode: MockNode) => Promise; testBody: (t: TestContext, driver: Driver, node: ZWaveNode, mockController: MockController, mockNode: MockNode, context: IntegrationTestContext) => Promise; additionalDriverOptions?: PartialZWaveOptions; } export interface IntegrationTestContext { /** The TCP server the driver is connected to. Only present when the `connectViaTCP` option is enabled. */ tcpServer?: net.Server; } export interface IntegrationTestFn { (name: string, options: IntegrationTestOptions): void; } export interface IntegrationTestModifiers { /** Only runs the tests inside this `integrationTest` suite for the current file */ only: IntegrationTestFn; /** Skips running the tests inside this `integrationTest` suite for the current file */ skip: IntegrationTestFn; } export interface IntegrationTest extends IntegrationTestFn, IntegrationTestModifiers { /** * Runs this test sequentially instead of concurrently with the other tests in the file. * Use for tests that assert on timing or ordering, which CPU contention would perturb. */ sequential: IntegrationTestFn & IntegrationTestModifiers; } /** Performs an integration test with a real driver using a mock controller and one mock node */ export declare const integrationTest: IntegrationTest; export {}; //# sourceMappingURL=integrationTestSuite.d.ts.map