Skip to content

test: cover more module types with the built-in CSS support - #610

Merged
alexander-akait merged 1 commit into
mainfrom
claude/docs-css-deps-update-hf1u96
Aug 29, 2026
Merged

test: cover more module types with the built-in CSS support#610
alexander-akait merged 1 commit into
mainfrom
claude/docs-css-deps-update-hf1u96

Conversation

@alexander-akait

@alexander-akait alexander-akait commented Aug 29, 2026

Copy link
Copy Markdown
Member

Summary

Follow-up to #609, rebased on top of it. The README rewrite and the tests that #609 already landed are dropped from this branch, leaving only the additional coverage.

getCssCompiler hardcoded type: "css/auto" on the rule, so only that module type could be exercised. The helper now takes the module type from its config argument (still defaulting to css/auto), which makes the other types testable.

New tests

  • css type — a *.module.less file compiled with type: "css" keeps its local class names, i.e. it is not treated as a CSS module because of its name.
  • css/module type — a file without .module in its name compiled with type: "css/module" has its local class names renamed.
  • Less warnings — a Less warning is reported as a webpack warning under the built-in CSS support (docs: use the built-in CSS support of webpack in examples #609 covers errors, not warnings).

The suite is green at 143 tests, as are npm run lint and npm run build.

@changeset-bot

changeset-bot Bot commented Aug 29, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 2141570

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Follow-up to #609. Allow the module `type` of the rule to be configured in
the `getCssCompiler` helper and add tests for it:

- the `css` type keeps local class names of a `*.module.less` file
- the `css/module` type renames local class names of any file
- a `Less` warning is reported as a webpack warning

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015mWLDEnMwEUsTLYX1akDLL
@alexander-akait
alexander-akait force-pushed the claude/docs-css-deps-update-hf1u96 branch from 860bad0 to 2141570 Compare August 29, 2026 13:32
@alexander-akait alexander-akait changed the title docs: use webpack built-in CSS support in examples test: cover more module types with the built-in CSS support Aug 29, 2026
@codecov

codecov Bot commented Aug 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.61%. Comparing base (85812ac) to head (2141570).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #610   +/-   ##
=======================================
  Coverage   96.61%   96.61%           
=======================================
  Files           2        2           
  Lines         649      649           
=======================================
  Hits          627      627           
  Misses         22       22           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@alexander-akait
alexander-akait merged commit 043e9b2 into main Aug 29, 2026
16 checks passed
@alexander-akait
alexander-akait deleted the claude/docs-css-deps-update-hf1u96 branch August 29, 2026 13:59
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