-
Notifications
You must be signed in to change notification settings - Fork 55
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
Add 12 remaining 51media sytests #279
Conversation
tests/url_preview_test.go
Outdated
match.JSONKeyEqual(e("matrix:image:size"), 2239.0), | ||
match.JSONKeyEqual(e("og:image:height"), 129.0), | ||
match.JSONKeyEqual(e("og:image:width"), 279.0), |
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.
See #278, all JSON keys are returned floats, apparantly.
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.
This needs a bit of work, but overall the code is excellent. The main points:
- Remove the tests which spin up web servers.
- Use
image/png
instead of a homebrew validator. - Upgrade complement to 1.16 and use the
embed
package.
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.
Looks amazing, thank you!
This will add
allsome remaining51media
sytests, excluding the ones ignored in #276;Edit: Tests prefixed with
X
are removed after review.This also adds a
SplitMxc
small helper function toclient
, for code dedup.