Skip to content

Commit

Permalink
fix: imports in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AlCalzone committed Nov 6, 2024
1 parent d86fd96 commit 7edd1b8
Show file tree
Hide file tree
Showing 49 changed files with 50 additions and 50 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { isArray } from "alcalzone-shared/typeguards/index.js";
import { isArray } from "alcalzone-shared/typeguards";
import { test } from "vitest";
import { ConditionalDeviceConfig } from "./DeviceConfig.js";

Expand Down
2 changes: 1 addition & 1 deletion packages/serial/src/serialport/ZWaveSerialPort.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Bytes } from "@zwave-js/shared/safe";
import { wait } from "alcalzone-shared/async/index.js";
import { wait } from "alcalzone-shared/async";
import { PassThrough } from "node:stream";
import sinon from "sinon";
import { afterEach, beforeEach, test } from "vitest";
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/src/AsyncQueue.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { wait } from "alcalzone-shared/async/index.js";
import { wait } from "alcalzone-shared/async";
import { test } from "vitest";
import { AsyncQueue } from "./AsyncQueue.js";

Expand Down
4 changes: 2 additions & 2 deletions packages/zwave-js/src/lib/driver/Task.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ZWaveError, ZWaveErrorCodes, assertZWaveError } from "@zwave-js/core";
import { noop } from "@zwave-js/shared";
import { wait } from "alcalzone-shared/async/index.js";
import { createDeferredPromise } from "alcalzone-shared/deferred-promise/index.js";
import { wait } from "alcalzone-shared/async";
import { createDeferredPromise } from "alcalzone-shared/deferred-promise";
import { test } from "vitest";
import {
type TaskBuilder,
Expand Down
2 changes: 1 addition & 1 deletion packages/zwave-js/src/lib/log/Driver.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
assertMessage,
} from "@zwave-js/core/test";
import { FunctionType, Message, MessageType } from "@zwave-js/serial";
import { createDeferredPromise } from "alcalzone-shared/deferred-promise/index.js";
import { createDeferredPromise } from "alcalzone-shared/deferred-promise";
import colors from "ansi-colors";
import MockDate from "mockdate";
import { beforeEach, test as baseTest } from "vitest";
Expand Down
2 changes: 1 addition & 1 deletion packages/zwave-js/src/lib/node/VirtualEndpoint.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
MockNode,
getDefaultSupportedFunctionTypes,
} from "@zwave-js/testing";
import { wait } from "alcalzone-shared/async/index.js";
import { wait } from "alcalzone-shared/async";
import { test as baseTest } from "vitest";
import {
createDefaultMockControllerBehaviors,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
RateType,
} from "@zwave-js/cc";
import { createMockZWaveRequestFrame } from "@zwave-js/testing";
import { wait } from "alcalzone-shared/async/index.js";
import { wait } from "alcalzone-shared/async";
import path from "node:path";
import { integrationTest } from "../integrationTestSuite.js";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { DoorLockMode } from "@zwave-js/cc";
import { DoorLockCCValues } from "@zwave-js/cc/DoorLockCC";
import { NotificationCCReport } from "@zwave-js/cc/NotificationCC";
import { createMockZWaveRequestFrame } from "@zwave-js/testing";
import { wait } from "alcalzone-shared/async/index.js";
import { wait } from "alcalzone-shared/async";
import path from "node:path";
import { integrationTest } from "../integrationTestSuite.js";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
} from "@zwave-js/cc/NotificationCC";
import { CommandClasses, type ValueMetadataNumeric } from "@zwave-js/core";
import { createMockZWaveRequestFrame } from "@zwave-js/testing";
import { wait } from "alcalzone-shared/async/index.js";
import { wait } from "alcalzone-shared/async";
import { integrationTest } from "../integrationTestSuite.js";

integrationTest(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
NotificationCCValues,
} from "@zwave-js/cc/NotificationCC";
import { createMockZWaveRequestFrame } from "@zwave-js/testing";
import { wait } from "alcalzone-shared/async/index.js";
import { wait } from "alcalzone-shared/async";
import path from "node:path";
import { integrationTest } from "../integrationTestSuite.js";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
NotificationCCValues,
} from "@zwave-js/cc/NotificationCC";
import { createMockZWaveRequestFrame } from "@zwave-js/testing";
import { wait } from "alcalzone-shared/async/index.js";
import { wait } from "alcalzone-shared/async";
import path from "node:path";
import { integrationTest } from "../integrationTestSuite.js";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
} from "@zwave-js/cc/BinarySwitchCC";
import { createMockZWaveRequestFrame } from "@zwave-js/testing";

import { wait } from "alcalzone-shared/async/index.js";
import { wait } from "alcalzone-shared/async";
import path from "node:path";
import { integrationTest } from "../integrationTestSuite.js";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
} from "@zwave-js/cc/NotificationCC";
import { ValueMetadata } from "@zwave-js/core";
import { createMockZWaveRequestFrame } from "@zwave-js/testing";
import { wait } from "alcalzone-shared/async/index.js";
import { wait } from "alcalzone-shared/async";
import path from "node:path";
import { integrationTest } from "../integrationTestSuite.js";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
} from "@zwave-js/cc/NotificationCC";
import { CommandClasses } from "@zwave-js/core";
import { createMockZWaveRequestFrame } from "@zwave-js/testing";
import { wait } from "alcalzone-shared/async/index.js";
import { wait } from "alcalzone-shared/async";
import sinon from "sinon";
import { integrationTest } from "../integrationTestSuite.js";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ZWaveProtocolCCNodeInformationFrame } from "@zwave-js/cc";
import { CommandClasses } from "@zwave-js/core";
import { createMockZWaveRequestFrame } from "@zwave-js/testing";
import { wait } from "alcalzone-shared/async/index.js";
import { wait } from "alcalzone-shared/async";
import path from "node:path";
import { integrationTest } from "../integrationTestSuite.js";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
MockZWaveFrameType,
createMockZWaveRequestFrame,
} from "@zwave-js/testing";
import { wait } from "alcalzone-shared/async/index.js";
import { wait } from "alcalzone-shared/async";
import { randomBytes } from "node:crypto";
import path from "node:path";
import { integrationTest } from "../integrationTestSuite.js";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
type MockNodeBehavior,
createMockZWaveRequestFrame,
} from "@zwave-js/testing";
import { wait } from "alcalzone-shared/async/index.js";
import { wait } from "alcalzone-shared/async";
import path from "node:path";
import { integrationTest } from "../integrationTestSuite.js";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Bytes } from "@zwave-js/shared";
import { type MockControllerBehavior } from "@zwave-js/testing";
import { wait } from "alcalzone-shared/async/index.js";
import { wait } from "alcalzone-shared/async";
import { integrationTest } from "../integrationTestSuite.js";

integrationTest(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
getDefaultMockControllerCapabilities,
getDefaultSupportedFunctionTypes,
} from "@zwave-js/testing";
import { wait } from "alcalzone-shared/async/index.js";
import { wait } from "alcalzone-shared/async";
import sinon from "sinon";
import {
MockControllerCommunicationState,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { BatteryCCReport, BatteryCCValues } from "@zwave-js/cc";
import { CommandClasses } from "@zwave-js/core";
import { createMockZWaveRequestFrame } from "@zwave-js/testing";
import { wait } from "alcalzone-shared/async/index.js";
import { wait } from "alcalzone-shared/async";
import path from "node:path";
import { integrationTest } from "../integrationTestSuite.js";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
type MockControllerBehavior,
createMockZWaveRequestFrame,
} from "@zwave-js/testing";
import { wait } from "alcalzone-shared/async/index.js";
import { wait } from "alcalzone-shared/async";
import { integrationTest } from "../integrationTestSuite.js";

integrationTest(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import {
MockZWaveFrameType,
createMockZWaveRequestFrame,
} from "@zwave-js/testing";
import { wait } from "alcalzone-shared/async/index.js";
import { wait } from "alcalzone-shared/async";
import { integrationTest } from "../integrationTestSuite.js";

// Repro for https://github.com/zwave-js/node-zwave-js/issues/6305
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
getDefaultMockControllerCapabilities,
getDefaultSupportedFunctionTypes,
} from "@zwave-js/testing";
import { wait } from "alcalzone-shared/async/index.js";
import { wait } from "alcalzone-shared/async";
import { integrationTest } from "../integrationTestSuite.js";

const spyTransport = new SpyTransport();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
type MockNodeBehavior,
createMockZWaveRequestFrame,
} from "@zwave-js/testing";
import { wait } from "alcalzone-shared/async/index.js";
import { wait } from "alcalzone-shared/async";
import { integrationTest } from "../integrationTestSuite.js";

integrationTest(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
getDefaultMockControllerCapabilities,
getDefaultSupportedFunctionTypes,
} from "@zwave-js/testing";
import { wait } from "alcalzone-shared/async/index.js";
import { wait } from "alcalzone-shared/async";
import { integrationTest } from "../integrationTestSuiteMulti.js";

// Regression test for #5844
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
MockZWaveFrameType,
createMockZWaveRequestFrame,
} from "@zwave-js/testing";
import { wait } from "alcalzone-shared/async/index.js";
import { wait } from "alcalzone-shared/async";
import path from "node:path";
import { integrationTest } from "../integrationTestSuite.js";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
MockZWaveFrameType,
createMockZWaveRequestFrame,
} from "@zwave-js/testing";
import { wait } from "alcalzone-shared/async/index.js";
import { wait } from "alcalzone-shared/async";
import path from "node:path";
import { integrationTest } from "../integrationTestSuiteMulti.js";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { BasicCCGet, BasicCCSet } from "@zwave-js/cc";
import { MessagePriority, NodeStatus } from "@zwave-js/core";
import { type SendDataRequest } from "@zwave-js/serial/serialapi";
import { MOCK_FRAME_ACK_TIMEOUT, MockZWaveFrameType } from "@zwave-js/testing";
import { wait } from "alcalzone-shared/async/index.js";
import { wait } from "alcalzone-shared/async";
import path from "node:path";
import { integrationTest } from "../integrationTestSuite.js";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { NodeStatus } from "@zwave-js/core";
import { wait } from "alcalzone-shared/async/index.js";
import { wait } from "alcalzone-shared/async";
import path from "node:path";
import { integrationTest } from "../integrationTestSuite.js";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { BasicCCGet, BasicCCSet } from "@zwave-js/cc";
import { NodeStatus, ZWaveErrorCodes, assertZWaveError } from "@zwave-js/core";
import { MockZWaveFrameType } from "@zwave-js/testing";
import { wait } from "alcalzone-shared/async/index.js";
import { wait } from "alcalzone-shared/async";
import path from "node:path";
import { integrationTest } from "../integrationTestSuite.js";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
type MockNodeBehavior,
createMockZWaveRequestFrame,
} from "@zwave-js/testing";
import { wait } from "alcalzone-shared/async/index.js";
import { wait } from "alcalzone-shared/async";
import path from "node:path";
import { integrationTest } from "../integrationTestSuite.js";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { WakeUpCCWakeUpNotification } from "@zwave-js/cc";
import { CommandClasses } from "@zwave-js/core";
import { createMockZWaveRequestFrame } from "@zwave-js/testing";
import { wait } from "alcalzone-shared/async/index.js";
import { wait } from "alcalzone-shared/async";
import { integrationTest } from "../integrationTestSuite.js";

integrationTest("Assume a node to be awake at the start of a re-interview", {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
ZWaveErrorCodes,
} from "@zwave-js/core";
import { type MockNodeBehavior, MockZWaveFrameType } from "@zwave-js/testing";
import { wait } from "alcalzone-shared/async/index.js";
import { wait } from "alcalzone-shared/async";
import path from "node:path";
import { integrationTest } from "../integrationTestSuite.js";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
MockZWaveFrameType,
createMockZWaveRequestFrame,
} from "@zwave-js/testing";
import { wait } from "alcalzone-shared/async/index.js";
import { wait } from "alcalzone-shared/async";
import { integrationTest } from "../integrationTestSuiteMulti.js";

integrationTest(
Expand Down
2 changes: 1 addition & 1 deletion packages/zwave-js/src/lib/test/driver/s2Collisions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {
type MockZWaveRequestFrame,
createMockZWaveRequestFrame,
} from "@zwave-js/testing";
import { wait } from "alcalzone-shared/async/index.js";
import { wait } from "alcalzone-shared/async";
import path from "node:path";
import { integrationTest } from "../integrationTestSuite.js";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { CommandClasses, TransactionState } from "@zwave-js/core";
import sinon from "sinon";

import { getEnumMemberName } from "@zwave-js/shared";
import { wait } from "alcalzone-shared/async/index.js";
import { wait } from "alcalzone-shared/async";
import path from "node:path";
import { integrationTest } from "../integrationTestSuite.js";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
getDefaultMockControllerCapabilities,
getDefaultSupportedFunctionTypes,
} from "@zwave-js/testing";
import { wait } from "alcalzone-shared/async/index.js";
import { wait } from "alcalzone-shared/async";
import {
MockControllerCommunicationState,
MockControllerStateKeys,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
getDefaultMockControllerCapabilities,
getDefaultSupportedFunctionTypes,
} from "@zwave-js/testing";
import { wait } from "alcalzone-shared/async/index.js";
import { wait } from "alcalzone-shared/async";
import {
MockControllerCommunicationState,
MockControllerStateKeys,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
} from "@zwave-js/cc";
import { CommandClasses, SupervisionStatus } from "@zwave-js/core";
import { type MockNodeBehavior, MockZWaveFrameType } from "@zwave-js/testing";
import { wait } from "alcalzone-shared/async/index.js";
import { wait } from "alcalzone-shared/async";
import { integrationTest } from "../integrationTestSuite.js";

integrationTest(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
} from "@zwave-js/cc";
import { CommandClasses } from "@zwave-js/core";
import { type MockNodeBehavior, MockZWaveFrameType } from "@zwave-js/testing";
import { wait } from "alcalzone-shared/async/index.js";
import { wait } from "alcalzone-shared/async";
import { integrationTest } from "../integrationTestSuite.js";

integrationTest("setValue without supervision: expect validation GET", {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
MOCK_FRAME_ACK_TIMEOUT,
type MockNodeBehavior,
} from "@zwave-js/testing";
import { wait } from "alcalzone-shared/async/index.js";
import { wait } from "alcalzone-shared/async";
import { integrationTest } from "../integrationTestSuite.js";

// Repro for https://github.com/home-assistant/core/issues/98491
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
} from "@zwave-js/cc";
import { CommandClasses, SupervisionStatus } from "@zwave-js/core";
import { type MockNodeBehavior, MockZWaveFrameType } from "@zwave-js/testing";
import { wait } from "alcalzone-shared/async/index.js";
import { wait } from "alcalzone-shared/async";
import sinon from "sinon";
import { integrationTest } from "../integrationTestSuite.js";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
MockZWaveFrameType,
createMockZWaveRequestFrame,
} from "@zwave-js/testing";
import { wait } from "alcalzone-shared/async/index.js";
import { wait } from "alcalzone-shared/async";
import { integrationTest } from "../integrationTestSuite.js";

integrationTest(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
} from "@zwave-js/cc";
import { CommandClasses, SupervisionStatus } from "@zwave-js/core";
import { type MockNodeBehavior } from "@zwave-js/testing";
import { wait } from "alcalzone-shared/async/index.js";
import { wait } from "alcalzone-shared/async";
import sinon from "sinon";
import { integrationTest } from "../integrationTestSuite.js";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
ccCaps,
createMockZWaveRequestFrame,
} from "@zwave-js/testing";
import { wait } from "alcalzone-shared/async/index.js";
import { wait } from "alcalzone-shared/async";
import { integrationTest } from "../integrationTestSuite.js";

integrationTest(
Expand Down
Loading

0 comments on commit 7edd1b8

Please sign in to comment.