Skip to content

test(native): make path helper expectations platform-aware#276

Closed
haosenwang1018 wants to merge 1 commit into
MoonshotAI:mainfrom
haosenwang1018:test/native-path-helpers-platform-separators
Closed

test(native): make path helper expectations platform-aware#276
haosenwang1018 wants to merge 1 commit into
MoonshotAI:mainfrom
haosenwang1018:test/native-path-helpers-platform-separators

Conversation

@haosenwang1018
Copy link
Copy Markdown

Related Issue

Part of #225

Problem

The native path helper tests expected absolute paths by interpolating ${appRoot}/... with POSIX separators. The helpers themselves correctly use node:path.resolve(), so they return native \ separators on Windows. That makes the test fail on Windows even though the implementation is behaving as intended.

What changed

  • Added a small underAppRoot() test helper that builds expected absolute paths with node:path.resolve().
  • Updated filesystem path expectations to use the helper.
  • Left nativeManifestKey() expectations unchanged because manifest keys are artifact keys, not native filesystem paths.
  • Added an empty changeset because this is a test-only portability fix with no published package bump.

Verification

  • pnpm --filter @moonshot-ai/kimi-code exec vitest run test/scripts/native/paths.test.ts
  • pnpm --filter @moonshot-ai/kimi-code run typecheck
  • pnpm exec oxlint apps/kimi-code/test/scripts/native/paths.test.ts
  • pnpm --filter @moonshot-ai/kimi-code run test
  • pnpm changeset status --since=origin/main

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • I have added tests that prove my feature works.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jun 1, 2026

🦋 Changeset detected

Latest commit: ced5f90

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@liruifengv liruifengv closed this Jun 2, 2026
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.

2 participants