-
Notifications
You must be signed in to change notification settings - Fork 4
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 tests borrowed from Hiccup's test suite and make small tweaks to match Hiccup/Reagent behavior. #4
base: main
Are you sure you want to change the base?
Conversation
Based on looking into it further, MPL and EPL are very similar and as far as I can tell, can be combined freely. |
Latest version of Reagent's test suite: https://github.com/reagent-project/reagent/blob/master/src/reagent/impl/template.cljs. While I'm just integrating Hiccup tests for now, I'm trying to avoid introducing any incompatibilities. |
1cb4232
to
2dc4b3e
Compare
I think we can merge this after #5. |
I believe that #7 would have been caught by these tests. |
Caught more issues introduced (I'm pretty sure) by #5:
The latter might be due to the interaction between #5 and this PR since I think the fragment test existed prior to this PR. Never mind, that second issue was caused by a typo I introduced during rebase. |
906c6de
to
64e47e1
Compare
For example, `['div]` and `["div"] are now allowed. This ensures compatability with the original Hiccup and also Reagent
Document a few discrepancies I've noticed between our libraryy and others.
We throw a different exception than Hiccup does.
This matches the behavior of Reagent and the original Hiccup. For example, in `[:div#foo {:id "bar"}]`, the id would be bar and not foo.
Our output differs slightly in ways that don't make any semantic difference.
Revise wording and add bullet about `style` attribute.
Remove some issues that were in the original Hiccup tests.
64e47e1
to
c2dd8a5
Compare
So far, the only divergence that has a semantic difference is our handling of conflicts between attributes in the map and tag. I think we want to follow Reagent's handling, but I don't know what that is yet.