Skip to content

test(cli): import inquirerer test utils directly from @inquirerer/test#1027

Merged
pyramation merged 1 commit intomainfrom
feat/cli-test-direct-import
Apr 26, 2026
Merged

test(cli): import inquirerer test utils directly from @inquirerer/test#1027
pyramation merged 1 commit intomainfrom
feat/cli-test-direct-import

Conversation

@pyramation
Copy link
Copy Markdown
Contributor

Summary

The packages/cli/test-utils/index.ts 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 makes cli.test.ts import from @inquirerer/test directly so the source is obvious, and trims test-utils/index.ts down to the genuinely local fixture helpers.

- import { KEY_SEQUENCES, setupTests, TestEnvironment } from '../test-utils';
+ import { KEY_SEQUENCES, setupTests, TestEnvironment } from '@inquirerer/test';

No behavioural change — the symbols are identical (the local barrel was just export { ... } from '@inquirerer/test'). test-utils/fixtures.ts stays put because it's a genuinely local wrapper around createTestFixture.

Review & Testing Checklist for Human

  • pnpm --filter @constructive-io/cli test still passes locally (with @constructive-io/graphql-codegen built — both cli.test.ts and codegen.test.ts should be green).
  • No other packages/cli/test-utils imports got broken — confirmed via grep, only cli.test.ts referenced this path.

Notes

Companion PR: constructive-io/dev-utils#79 adds a runCli subprocess helper to @inquirerer/test and a Testing section to inquirerer's main README pointing at the package. This PR is independent of that one (it just uses the existing in-process setupTests API), but they're part of the same "make CLI testing easy and discoverable" thread.

A separate downstream PR will follow in constructive-io/agentic-db to swap the hand-rolled runCli in cli-e2e-tests for the new shared helper once dev-utils#79 lands.

Link to Devin session: https://app.devin.ai/sessions/81001448b7c54b8099437f706d44a30d
Requested by: @pyramation

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.
@devin-ai-integration
Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@pyramation pyramation merged commit 4ed99db into main Apr 26, 2026
51 checks passed
@pyramation pyramation deleted the feat/cli-test-direct-import branch April 26, 2026 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant