Skip to content

test(avatar): improve test coverage#1980

Open
aioya wants to merge 1 commit into
varletjs:devfrom
aioya:test/avatar-coverage
Open

test(avatar): improve test coverage#1980
aioya wants to merge 1 commit into
varletjs:devfrom
aioya:test/avatar-coverage

Conversation

@aioya

@aioya aioya commented Jun 21, 2026

Copy link
Copy Markdown
Collaborator

Checklist

List of tasks you have already done and plan to do.

  • Fix linting errors
  • Tests have been added / updated (or snapshots)

Change information

Improve unit test coverage for the avatar component. Pure test additions, no behavior changes.

Issues

N/A

Related Links

N/A

@vercel

vercel Bot commented Jun 21, 2026

Copy link
Copy Markdown

@aioya is attempting to deploy a commit to the varletjs Team on Vercel.

A member of the Team first needs to authorize it.

@aioya aioya self-assigned this Jun 21, 2026
@pkg-pr-new

pkg-pr-new Bot commented Jun 21, 2026

Copy link
Copy Markdown

Open in StackBlitz

@varlet/cli

npm i https://pkg.pr.new/@varlet/cli@1980

@varlet/icons

npm i https://pkg.pr.new/@varlet/icons@1980

@varlet/import-resolver

npm i https://pkg.pr.new/@varlet/import-resolver@1980

@varlet/preset-tailwindcss

npm i https://pkg.pr.new/@varlet/preset-tailwindcss@1980

@varlet/preset-unocss

npm i https://pkg.pr.new/@varlet/preset-unocss@1980

@varlet/shared

npm i https://pkg.pr.new/@varlet/shared@1980

@varlet/touch-emulator

npm i https://pkg.pr.new/@varlet/touch-emulator@1980

@varlet/ui

npm i https://pkg.pr.new/@varlet/ui@1980

@varlet/use

npm i https://pkg.pr.new/@varlet/use@1980

@varlet/vite-plugins

npm i https://pkg.pr.new/@varlet/vite-plugins@1980

commit: 5e26722

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Improves unit test coverage for the Avatar and AvatarGroup components within varlet-ui, adding assertions for text scaling behavior, lazy-load error handling, and additional AvatarGroup class/style scenarios.

Changes:

  • Added a unit test to cover Avatar text scaling when the avatar container is wider than its text content.
  • Added a unit test for Avatar lazy-mode error callback behavior (error state handled via the load handler).
  • Added AvatarGroup tests to verify class toggling (vertical) and offset CSS variable behavior (set and unset).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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