chore(tests): update import paths for test utilities#309
Conversation
* Changed import paths from `#internal/test-utils` to `#test-utils` across multiple test files. * This change simplifies the import structure and avoids the need for building test-utils during development.
* Refactored import paths for `isUnix` and `isWindows` in test files to use internal aliases. * Removed the `conditions.ts` file as it is no longer needed. * Updated `tsconfig.json` and `base.json` to reflect the new import structure.
* Introduced utility functions to detect the operating system. * Functions include `isWindows`, `isMac`, `isLinux`, and `isUnix`.
|
🌏 Preview Deployments
Built from commit: 🤖 This comment will be updated automatically when you push new commits to this PR. |
|
Caution Review failedThe pull request is closed. WalkthroughRepository-wide switch from internal test-utils aliases to public #test-utils for msw/mock-store, introduction of a new internal alias #internal/test-utils/conditions, removal of conditions exports from @ucdjs/test-utils, corresponding import updates in tests, alias updates in tsconfig and Vitest config, and documentation adjustments. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (19)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull Request Overview
This PR updates import paths for test utilities by changing from #internal/test-utils to #test-utils for the main test utilities, while introducing a new #internal/test-utils/conditions alias for OS condition checks. This refactoring improves the organization and clarity of test utility imports.
- Renamed the main test utility import aliases from
#internal/test-utils/*to#test-utils/* - Added a new
#internal/test-utils/conditionsalias for OS condition utilities - Updated all test files to use the new import paths
- Moved OS condition exports out of the main test-utils package
Reviewed Changes
Copilot reviewed 20 out of 21 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| vitest.config.ts | Updated alias configuration to use #test-utils and added #internal/test-utils/conditions |
| tooling/tsconfig/base.json | Updated TypeScript path mappings to match new alias structure |
| packages/ucd-store/test/**.test.ts | Updated imports from #internal/test-utils to #test-utils |
| packages/test-utils/tsconfig.json | Added conditions.ts to include array |
| packages/test-utils/src/index.ts | Removed OS condition exports |
| packages/path-utils/test/**.test.ts | Updated to use #internal/test-utils/conditions for OS checks |
| packages/fs-bridge/test/**.test.ts | Updated imports to use #test-utils |
| packages/fetch/test/**.test.ts | Updated imports to use #test-utils |
| packages/cli/test/**.test.ts | Updated imports to use #test-utils |
| AGENTS.md | Updated documentation to reflect new import paths |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
🔗 Linked issue
resolves #297
closes #303
📚 Description
Summary by CodeRabbit