Skip to content
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

refactor: improve regression testing #1898

Merged
merged 1 commit into from
Dec 23, 2023

Conversation

SethFalco
Copy link
Member

@SethFalco SethFalco commented Dec 23, 2023

  • Update Playwright, pngjs, and pixelmatch.
    • Unfortunately, this slows down CI a little, but it resolves 7 of the broken images. 🎉
  • Rather than tracking that we skipped certain files, let's not extract them in the first place.
  • Make better use of async/await.
    • This change alone speeds up local W3C test runs by 13% for me when tested with the same version of the dependencies.
  • Only set the viewport once per page once rather than once per image.
  • Replace some code with modern Node.js APIs.
    • Import fs/promises rather than do fs.promise.xyz everywhere.
    • Replace how we find files with Nodes standard library. (Requires Node.js v18+.)
    • Note: The Node.js v18 API is relied on in tests only. SVGO still supports v14 for now.
  • A few other minor changes.

@SethFalco SethFalco merged commit 2c408ce into svg:main Dec 23, 2023
10 checks passed
@SethFalco SethFalco deleted the refactor-regression branch December 23, 2023 06:56
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