test: run suite without split runner

This commit is contained in:
YeonGyu-Kim
2026-05-15 16:26:57 +09:00
parent 150ccefa05
commit d8f52aae7f
34 changed files with 627 additions and 889 deletions
+9 -1
View File
@@ -1,10 +1,13 @@
/// <reference path="../../../bun-test.d.ts" />
import { describe, test, expect, mock, beforeEach, spyOn, afterAll } from 'bun:test'
import { describe, test, expect, mock, beforeEach, spyOn, afterAll, afterEach } from 'bun:test'
import type { TmuxConfig } from '../../config/schema'
import type { WindowState, PaneAction } from './types'
import type { ActionResult, ExecuteContext } from './action-executor'
import type { TmuxSessionManager as TmuxSessionManagerType, TmuxUtilDeps } from './manager'
import * as sharedModule from '../../shared'
import * as sharedTmuxOriginal from '../../shared/tmux'
const sharedTmuxSnapshot = { ...sharedTmuxOriginal }
type ExecuteActionsResult = {
success: boolean
@@ -131,6 +134,11 @@ function registerModuleMocks(): void {
afterAll(() => { mock.restore() })
afterEach(() => {
mock.restore()
mock.module('../../shared/tmux', () => sharedTmuxSnapshot)
})
const trackedSessions = new Set<string>()
const readySessions = new Set<string>()
@@ -1,9 +1,12 @@
/// <reference path="../../../bun-test.d.ts" />
import { beforeEach, describe, expect, mock, test, afterAll } from "bun:test"
import { afterEach, beforeEach, describe, expect, mock, test, afterAll } from "bun:test"
import type { TmuxConfig } from "../../config/schema"
import type { ActionResult, ExecuteContext, ExecuteActionsResult } from "./action-executor"
import type { TmuxUtilDeps } from "./manager"
import type { TrackedSession, WindowState } from "./types"
import * as sharedTmuxOriginal from "../../shared/tmux"
const sharedTmuxSnapshot = { ...sharedTmuxOriginal }
const mockQueryWindowState = mock<(paneId: string) => Promise<WindowState | null>>(async () => ({
windowWidth: 220,
@@ -53,6 +56,11 @@ function registerModuleMocks(): void {
afterAll(() => { mock.restore() })
afterEach(() => {
mock.restore()
mock.module("../../shared/tmux", () => sharedTmuxSnapshot)
})
const mockTmuxDeps: TmuxUtilDeps = {
isInsideTmux: mockIsInsideTmux,
getCurrentPaneId: mockGetCurrentPaneId,