Skip to content

πŸ§ͺ test: add missing tests for cn utility - #39

Merged
jasandroidx merged 1 commit into
ravenstackfrom
jules-cn-utility-tests-8848603167490716798
Sep 14, 2026
Merged

jasandroidx merged 1 commit into
ravenstackfrom
jules-cn-utility-tests-8848603167490716798

Conversation

@jasandroidx

Copy link
Copy Markdown
Owner

Added missing unit tests for the cn utility in ui-v2/src/lib/cn.test.ts.

🎯 What

  • Testing gap in ui-v2/src/lib/cn.ts where cn lacked direct unit test coverage.

πŸ“Š Coverage

  • Class string concatenation (foo bar).
  • Conditional class evaluations via clsx (isBarActive && "bar").
  • Complex structures including objects and arrays.
  • Tailwind class conflict resolution via twMerge (p-4 vs p-2).
  • Falsy, null, undefined, and empty argument handling.

✨ Result

  • Verified tests pass via pnpm test and code passes ESLint checks cleanly (pnpm lint).

PR created automatically by Jules for task 8848603167490716798 started by @jasandroidx

Added test suite in ui-v2/src/lib/cn.test.ts to verify the `cn` classname merger function.
Tests cover simple string merging, clsx conditional logic, array/object inputs,
Tailwind conflict resolution with twMerge, and falsy/empty inputs.

Co-authored-by: jasandroidx <77057656+jasandroidx@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

πŸ‘‹ Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a πŸ‘€ emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

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.

1 participant