UNPKG

zwave-js

Version:

Z-Wave driver written entirely in JavaScript/TypeScript

31 lines 1.93 kB
import type { MockController, MockControllerOptions, MockNode, MockNodeOptions } from "@zwave-js/testing"; 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; controllerCapabilities?: MockControllerOptions["capabilities"]; nodeCapabilities?: Pick<MockNodeOptions, "id" | "capabilities">[]; customSetup?: (driver: Driver, mockController: MockController, mockNodes: MockNode[]) => Promise<void>; testBody: (t: TestContext, driver: Driver, nodes: ZWaveNode[], mockController: MockController, mockNodes: MockNode[]) => Promise<void>; additionalDriverOptions?: PartialZWaveOptions; } export interface IntegrationTestFn { (name: string, options: IntegrationTestOptions): void; } export interface IntegrationTest extends IntegrationTestFn { /** 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; } /** Performs an integration test with a real driver using a mock controller and one mock node */ export declare const integrationTest: IntegrationTest; export {}; //# sourceMappingURL=integrationTestSuiteMulti.d.ts.map