close
Skip to content

Add a test to validate release assets#54

Merged
mikachan merged 6 commits intotrunkfrom
add/validate-release-test
Feb 25, 2026
Merged

Add a test to validate release assets#54
mikachan merged 6 commits intotrunkfrom
add/validate-release-test

Conversation

@mikachan
Copy link
Copy Markdown
Member

@mikachan mikachan commented Feb 24, 2026

Based on this PR that adds an AGENTS.md file: #53

This adds an npm test command that validates the output of npm run api and npm run previews before committing a new release. Tests use Node's built-in node:test runner and check that the generated JSON files are valid, structurally correct, and have corresponding SVG preview files on disk.

Also fixes a pre-existing ESLint misconfiguration that caused all JS files to fail npm run lint:js with a Babel error.

This makes it easier for both humans and agents to test if the release assets are correct.

To test, run: npm test and the new test should pass.

@mikachan mikachan added the enhancement New feature or request label Feb 24, 2026
Copy link
Copy Markdown

@scruffian scruffian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the tests pass. I get this error when running the linter:

wp-scripts lint-js

/Users/ben/Sites/google-fonts-to-wordpress-collection/tests/validate-release.test.js
132:9 error Replace ⏎↹↹slug,⏎↹}·=· with ·slug·}·=⏎↹↹ prettier/prettier
144:9 error Replace ⏎↹↹slug,⏎↹↹fontFace,⏎↹}·=· with ·slug,·fontFace·}·=⏎↹↹ prettier/prettier

✖ 2 problems (2 errors, 0 warnings)
2 errors and 0 warnings potentially fixable with the --fix option.

@mikachan
Copy link
Copy Markdown
Member Author

Thanks!

I get this error when running the linter:

Looks like I had to update my linter locally. This should be fixed now.

Copy link
Copy Markdown

@scruffian scruffian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Base automatically changed from add/agents-md to trunk February 25, 2026 10:19
@mikachan mikachan merged commit ab7cf35 into trunk Feb 25, 2026
@mikachan mikachan deleted the add/validate-release-test branch February 25, 2026 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants