GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test(core): use direct test imports by kitlangton · Pull Request #45683 · anomalyco/opencode

Conversation

@kitlangton

@kitlangton kitlangton commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Why
Several core test helpers bypass the repository import conventions with namespace imports and unnecessary aliases. That obscures which public barrel exports the tests rely on and makes otherwise distinct imported types appear to collide.

What Changes

  • Import Effect namespaces such as TestClock, TestConsole, PlatformError, and Scope through their named barrel exports.
  • Use the original SqlClient and plugin Context type names.
  • Use the existing os module object for temporary-directory lookup instead of aliasing tmpdir.

Scope
This PR changes import forms only. Test behavior, clock selection, fixture ownership, and heterogeneous tool output types are unchanged.

Verification

bun install --frozen-lockfile
cd packages/core && bun typecheck
cd packages/core && bun run test test/database-drizzle.test.ts test/effect/cross-spawn-spawner.test.ts test/instructions/builtins.test.ts test/integration.test.ts
bunx prettier --check packages/core/test/lib/effect.ts packages/core/test/effect/cross-spawn-spawner.test.ts packages/core/test/instructions/builtins.test.ts packages/core/test/integration.test.ts packages/core/test/fixture/tmpdir.ts packages/core/test/database-drizzle.test.ts packages/core/test/lib/tool.ts
git push -u origin direct-test-imports

The focused run passed 47 tests. Package typecheck, formatting, and the push-hook repository typecheck passed.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@kitlangton
test(core): use direct test imports
8adfe70
@github-actions github-actions Bot added the contributor label Aug 27, 2026
kitlangton added 2 commits August 27, 2026 22:44
@kitlangton
Merge remote-tracking branch 'origin/v2' into direct-test-imports
9cc5d44
# ------------------------ >8 ------------------------
# Do not modify or remove the line above.
# Everything below it will be ignored.
#
# Conflicts:
#	packages/core/test/lib/effect.ts
@kitlangton
Merge remote-tracking branch 'origin/v2' into direct-test-imports
07f4789
@kitlangton
kitlangton merged commit a519363 into v2 Aug 28, 2026
8 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@kitlangton
kitlangton deleted the direct-test-imports branch August 28, 2026 03:58
jinhuang712 pushed a commit to jinhuang712/opencode that referenced this pull request Sep 26, 2026
@kitlangton
test(core): use direct test imports (anomalyco#45683)
075377f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

contributor

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@kitlangton
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.