Skip to content

test: add tests for file-icons utils - #891

Merged
danielroe merged 1 commit into
mainfrom
jg/test-files-files-everywhere
Feb 3, 2026
Merged

test: add tests for file-icons utils#891
danielroe merged 1 commit into
mainfrom
jg/test-files-files-everywhere

Conversation

@43081j

Copy link
Copy Markdown
Contributor

No description provided.

@vercel

vercelBot commented Feb 3, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
npmx.devReadyReadyPreview, CommentFeb 3, 2026 9:55pm
2 Skipped Deployments
ProjectDeploymentActionsUpdated (UTC)
docs.npmx.devIgnoredIgnoredPreviewFeb 3, 2026 9:55pm
npmx-lunariaIgnoredIgnoredFeb 3, 2026 9:55pm

Request Review

@codecov

codecovBot commented Feb 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@coderabbitai

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

A new unit test suite is added for the getFileIcon utility function. The tests cover multiple scenarios including exact filename matches (package.json, Dockerfile, .gitignore, eslint.config.js, vitest.config.ts, .env), compound extensions (types.d.ts, utils.test.ts, utils.spec.js, Button.stories.tsx), simple extensions (.js, .ts, .vue, .json, .sh, .py, .rs, .png, .tar), and unknown file types. The suite verifies precedence rules where exact filename matches take priority over extensions, and compound extensions take priority over simple extensions. The tests use Vitest's describe and it functions to validate the icon mapping behaviour.

🚥 Pre-merge checks | ❌ 1
❌ Failed checks (1 inconclusive)
Check nameStatusExplanationResolution
Description check❓ InconclusiveThe pull request has no description provided by the author, making it impossible to evaluate whether it relates to the changeset.Please add a description explaining the purpose and scope of these unit tests for the file-icons utility.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch jg/test-files-files-everywhere

Comment @coderabbitai help to get the list of available commands and usage tips.

@danielroe
danielroe added this pull request to the merge queueFeb 3, 2026
Merged via the queue into main with commit 1f9a9f5Feb 3, 2026
19 checks passed
@danielroe
danielroe deleted the jg/test-files-files-everywhere branch February 3, 2026 22:21
Sign up for freeto 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

@43081j@danielroe