-
Notifications
You must be signed in to change notification settings - Fork 0
refactor: extracted code examples #32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors CSS test data by extracting inline code examples from test files into a centralized fixture system. This establishes a single source of truth for CSS transformation examples, reducing duplication and improving maintainability across the codebase.
- Creates centralized test fixtures in
test/fixtures/with input/expected pairs - Implements fixture utilities for loading test data programmatically
- Adds automated documentation generation that syncs fixture data with README examples
Reviewed Changes
Copilot reviewed 28 out of 28 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| test/fixtures/*.css | New centralized CSS test fixtures with input/expected pairs |
| test/fixture-utils.js | Utility functions for loading and managing test fixtures |
| scripts/build-docs.js | Automated documentation builder that injects fixture examples |
| packages/postcss-if-function/test/plugin.test.js | Refactored to use centralized fixtures instead of inline CSS |
| packages/css-if-polyfill/test/integrated.test.js | Updated to load fixtures for integration tests |
| packages/postcss-if-function/README.md | Updated with auto-generated fixture examples |
| package.json | Added build:docs script for documentation generation |
| docs/*.md | New documentation files demonstrating the fixture system |
This reverts commit 4ae5db6.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
…ke/css-if-polyfill into refactor-generalize-tests
…ke/css-if-polyfill into refactor-generalize-tests
…ke/css-if-polyfill into refactor-generalize-tests
🚀 Performance Benchmark Results
✅ All benchmarks passed! |
🚀 Performance Benchmark Results
✅ All benchmarks passed! |
Description
As code examples for transformations of input CSS to output CSS are spread through the whole codebase in tests and documentation, we should ensure somehow to reduce redundancies as well as having a single source of truth to correct some code in case of any mistakes or necessary updates.
Type of Change
Testing
Checklist
Browser Testing
If applicable, please test in the following browsers:
Performance Impact
If this change affects performance:
Breaking Changes
If this introduces breaking changes, please describe:
Additional Notes
Any additional information that reviewers should know.