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

Improve js unittests #1857

Open
ollimeier opened this issue Dec 15, 2024 · 2 comments
Open

Improve js unittests #1857

ollimeier opened this issue Dec 15, 2024 · 2 comments
Labels
code quality javascript Pull requests that update Javascript code

Comments

@ollimeier
Copy link
Collaborator

          > It would be great to have unittests for such methods, but I don't know how 

I have an idea for starting unittesting FontController and more, and it will be based on the .fontra format: for testing we should implement a class that reads .fontra from disk (Node-only), and is (minimally) compatible with the "remote" font object. We'd need a csv reader for this: we need to check npm. The rest of the data is JSON, and should be trivial to read. (.fontra uses 'unpacked paths' on disk, so we'd need to convert them to PackedPath upon reading, but that's more or less the only diversion from our in-memory object model.)

If you want you can write this up as an issue, so we can turn this into something actionable. Solving this will be very valuable long-term.

Originally posted by @justvanrossum in #1855 (comment)

@justvanrossum justvanrossum added code quality javascript Pull requests that update Javascript code labels Dec 15, 2024
@justvanrossum
Copy link
Collaborator

@justvanrossum
Copy link
Collaborator

We pretty much need to implement a read-only .fontra backend in JS, and then we can start writing unit tests for FontController.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code quality javascript Pull requests that update Javascript code
Projects
Status: No status
Development

No branches or pull requests

2 participants