test: cover more module types with the built-in CSS support - #610
Merged
Conversation
|
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
force-pushed
the
claude/docs-css-deps-update-hf1u96
branch
from
August 29, 2026 13:32
860bad0 to
2141570
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
getCssCompilerhardcodedtype: "css/auto"on the rule, so only that module type could be exercised. The helper now takes the moduletypefrom its config argument (still defaulting tocss/auto), which makes the other types testable.New tests
csstype — a*.module.lessfile compiled withtype: "css"keeps its local class names, i.e. it is not treated as a CSS module because of its name.css/moduletype — a file without.modulein its name compiled withtype: "css/module"has its local class names renamed.Lesswarning 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 lintandnpm run build.