From 34804a1fe468d78712ae7c91f4426c5e6a7304a9 Mon Sep 17 00:00:00 2001 From: Dan Lynch Date: Sun, 26 Apr 2026 21:50:08 +0000 Subject: [PATCH] test(cli): import inquirerer test utils directly from @inquirerer/test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The local 'packages/cli/test-utils' barrel was a pure passthrough re-export of @inquirerer/test, which made it look like there was a custom test harness when there wasn't. This points cli.test.ts at @inquirerer/test directly so it's obvious where the helpers come from, and trims test-utils/index.ts down to the genuinely local fixture helpers. No behavioural change — the symbols (KEY_SEQUENCES, setupTests, TestEnvironment) are identical. --- packages/cli/__tests__/cli.test.ts | 3 +-- packages/cli/test-utils/index.ts | 18 +++--------------- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/packages/cli/__tests__/cli.test.ts b/packages/cli/__tests__/cli.test.ts index 83fc8ac0b..ffd44e48f 100644 --- a/packages/cli/__tests__/cli.test.ts +++ b/packages/cli/__tests__/cli.test.ts @@ -1,7 +1,6 @@ +import { KEY_SEQUENCES, setupTests, TestEnvironment } from '@inquirerer/test'; import { Inquirerer, Question } from 'inquirerer'; -import { KEY_SEQUENCES, setupTests, TestEnvironment } from '../test-utils'; - const beforeEachSetup = setupTests(); describe('Inquirerer', () => { diff --git a/packages/cli/test-utils/index.ts b/packages/cli/test-utils/index.ts index 02039f9b5..28e105dc9 100644 --- a/packages/cli/test-utils/index.ts +++ b/packages/cli/test-utils/index.ts @@ -1,16 +1,4 @@ +// Local CLI fixture helpers. For inquirerer testing primitives +// (KEY_SEQUENCES, setupTests, createTestEnvironment, snapshot utils, etc.), +// import directly from `@inquirerer/test`. export * from './fixtures'; - -// Re-export test utilities from @inquirerer/test -export { - KEY_SEQUENCES, - setupTests, - createTestEnvironment, - normalizePackageJsonForSnapshot, - cleanAnsi -} from '@inquirerer/test'; - -export type { - TestEnvironment, - InputResponse, - NormalizeOptions -} from '@inquirerer/test';