Skip to content

test: add comprehensive test coverage for props, typestyles build, and migrate packages#45

Merged
dbanksdesign merged 2 commits into
mainfrom
copilot/analyze-test-coverage
Apr 1, 2026
Merged

test: add comprehensive test coverage for props, typestyles build, and migrate packages#45
dbanksdesign merged 2 commits into
mainfrom
copilot/analyze-test-coverage

Conversation

Copilot AI commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Analyzed test coverage gaps across the monorepo and added 76 new tests across 6 new/expanded test files targeting previously untested modules.

Changes

New test files

  • packages/props/src/utils.test.ts (18 tests) — unit tests for sanitizeValue, toKebabCase, and isConditionalValue helper functions
  • packages/props/src/generate.test.ts (14 tests) — unit tests for generateAllAtomicClasses (media queries, container queries, @supports, selector conditions, object/array value formats, camelCase→kebab-case) and generateFromCollections
  • packages/props/src/runtime.test.ts (16 tests) — unit tests for buildLookupMap, expandShorthands, and createResolver (direct values, conditional values, shorthand expansion, null-skipping)
  • packages/typestyles/src/build.test.ts (6 tests) — tests for collectStylesFromModules covering sync/async loaders, multiple loaders, deduplication, and ordering
  • packages/migrate/test/css.test.ts (12 tests) — direct unit tests for cssToObjectExpression: camelCase conversion, custom properties, numeric literals, nested selectors, at-rule warnings, key node types
  • packages/migrate/test/files.test.ts (10 tests) — tests for collectTargetFiles: extension filtering, literal file targets, include/exclude patterns, default node_modules exclusion, sorted output, deduplication

Expanded test file

  • packages/migrate/test/migrate.test.ts — 20 additional cases:
    • migrateSource: @emotion/styled, @emotion/css, css from styled-components, styled(Component) wrapping, className merging, exported component warning, non-JSX reference warning, existing typestyles import reuse, duplicate styles specifier prevention, kebab-case naming
    • runMigration: summary counts, JSON report writing, extensions option, warning accumulation, empty directory, nested report directory creation

Test results

Package Before After
typestyles 139 tests 145 tests ✅
props 53 tests (pre-existing failures unrelated) 53 new tests ✅
migrate 3 tests 43 tests ✅

@netlify

netlify Bot commented Apr 1, 2026

Copy link
Copy Markdown

Deploy Preview for typestyles ready!

Name Link
🔨 Latest commit 007cf9f
🔍 Latest deploy log https://app.netlify.com/projects/typestyles/deploys/69cca307af00f50007551de2
😎 Deploy Preview https://deploy-preview-45--typestyles.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI requested a review from dbanksdesign April 1, 2026 04:46
@dbanksdesign dbanksdesign marked this pull request as ready for review April 1, 2026 05:26
@dbanksdesign dbanksdesign merged commit ca46784 into main Apr 1, 2026
6 of 7 checks passed
@dbanksdesign dbanksdesign deleted the copilot/analyze-test-coverage branch April 1, 2026 05:27
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