Skip to content

fix: export formatCssRule instead of undefined formatCss - #190

Open
samuelcaldas wants to merge 2 commits into
newsdev:masterfrom
samuelcaldas:fix/format-css-rule-export
Open

samuelcaldas wants to merge 2 commits into
newsdev:masterfrom
samuelcaldas:fix/format-css-rule-export

Conversation

@samuelcaldas

Copy link
Copy Markdown

Description

In ai2html.js, formatCss was refactored into formatCssRule, but exportFunctionsForTesting() and test/utils-test.js still referenced formatCss, causing a ReferenceError: formatCss is not defined when importing in Node.js or running npm test.

Changes

  • Updated exportFunctionsForTesting to export formatCssRule in ai2html.js
  • Updated unit test in test/utils-test.js to test formatCssRule()

🤖 Generated with Claude Code

samuelcaldas and others added 2 commits August 30, 2026 11:54
Co-Authored-By: Claude Code <noreply@anthropic.com>
- Export formatCssRule instead of undefined formatCss in exportFunctionsForTesting
- Update unit test to verify formatCssRule
- Add .playwright-mcp to .gitignore

Co-Authored-By: Claude Code <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 30, 2026 15:17

Copilot AI left a comment

Copy link
Copy Markdown

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 fixes a Node.js test/import failure caused by exportFunctionsForTesting() still referencing the old formatCss symbol after it was refactored to formatCssRule, leading to ReferenceError: formatCss is not defined.

Changes:

  • Updated exportFunctionsForTesting() to export formatCssRule instead of the removed formatCss.
  • Updated the unit test to validate formatCssRule() output.
  • Updated .gitignore (adds .playwright-mcp) and synchronized the package version recorded in package-lock.json.

Reviewed changes

Copilot reviewed 2 out of 4 changed files in this pull request and generated no comments.

File Description
ai2html.js Fixes Node test exports by exporting formatCssRule (prevents ReferenceError).
test/utils-test.js Updates unit coverage to call/assert formatCssRule() instead of formatCss().
package-lock.json Aligns lockfile’s recorded package version with the current package version.
.gitignore Ignores .playwright-mcp and normalizes the existing ai2html-config.json entry.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

This branch has not been deployed

No deployments
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