diff --git a/packages/integration-tests/cypress/support/tui-sandbox.ts b/packages/integration-tests/cypress/support/tui-sandbox.ts index 8c144cc..ac2d1da 100644 --- a/packages/integration-tests/cypress/support/tui-sandbox.ts +++ b/packages/integration-tests/cypress/support/tui-sandbox.ts @@ -12,14 +12,12 @@ import type { RunExCommandOutput, RunLuaCodeOutput, StartNeovimGenericArguments, + TestDirectory, } from "@tui-sandbox/library/dist/src/server/types" import type { OverrideProperties } from "type-fest" import type { MyTestDirectory, MyTestDirectoryFile } from "../../MyTestDirectory" -export type NeovimContext = { - contents: MyTestDirectory - rootPathAbsolute: string -} +export type NeovimContext = TestDirectory declare global { interface Window { diff --git a/packages/library/src/server/cypress-support/contents.test.ts b/packages/library/src/server/cypress-support/contents.test.ts index 5a81eaf..d846b53 100644 --- a/packages/library/src/server/cypress-support/contents.test.ts +++ b/packages/library/src/server/cypress-support/contents.test.ts @@ -17,14 +17,12 @@ it("should return the expected contents", async () => { RunExCommandOutput, RunLuaCodeOutput, StartNeovimGenericArguments, + TestDirectory, } from "@tui-sandbox/library/dist/src/server/types" import type { OverrideProperties } from "type-fest" import type { MyTestDirectory, MyTestDirectoryFile } from "../../MyTestDirectory" - export type NeovimContext = { - contents: MyTestDirectory - rootPathAbsolute: string - } + export type NeovimContext = TestDirectory declare global { interface Window { diff --git a/packages/library/src/server/cypress-support/contents.ts b/packages/library/src/server/cypress-support/contents.ts index cbc1b0e..8ca64b6 100644 --- a/packages/library/src/server/cypress-support/contents.ts +++ b/packages/library/src/server/cypress-support/contents.ts @@ -20,14 +20,12 @@ import type { RunExCommandOutput, RunLuaCodeOutput, StartNeovimGenericArguments, + TestDirectory, } from "@tui-sandbox/library/dist/src/server/types" import type { OverrideProperties } from "type-fest" import type { MyTestDirectory, MyTestDirectoryFile } from "../../MyTestDirectory" -export type NeovimContext = { - contents: MyTestDirectory - rootPathAbsolute: string -} +export type NeovimContext = TestDirectory declare global { interface Window { diff --git a/packages/library/src/server/types.ts b/packages/library/src/server/types.ts index 53695ba..2fcca27 100644 --- a/packages/library/src/server/types.ts +++ b/packages/library/src/server/types.ts @@ -8,7 +8,7 @@ import type { VimValue } from "neovim/lib/types/VimValue.js" * be written with confidence that the files and directories they expect are * actually found. Otherwise the tests are brittle and can break easily. */ -export type TestDirectory = { +export type TestDirectory = { /** The path to the unique test directory (the root). * * @example /Users/mikavilpas/git/tui-sandbox/packages/integration-tests/test-environment/testdirs/dir-0199UZ @@ -28,7 +28,7 @@ export type TestDirectory = { */ testEnvironmentPathRelative: string - contents: object + contents: TContents } export type { StartNeovimGenericArguments } from "../server/neovim/NeovimApplication.js"