julianrubisch / bridgetown-media-transformation

MIT License
6 stars 1 forks source link

Add test for lazy keyword argument #8

Closed asgerb closed 3 years ago

asgerb commented 3 years ago

I found myself a bit confused as to how the kargs were supposed to be passed to the liquid_tag and after finally figuring it out I thought to add a small test for it, both for the sake of testing the code, but also as a means of documenting the API.

This PR adds a test for the lazy keyword argument and updates the test suite to use regex for checking the resulting html.

julianrubisch commented 3 years ago

Thanks :-) yeah agreed that it could be better documented, but technically I haven't gotten around to releasing it yet ;-)

Thanks for the heads up!

asgerb commented 3 years ago

Thanks @julianrubisch! I was wondering if it would be possible to use "real" key word arguments instead of the JSON string? It would make it easier to pass through args from components etc.

I also wondered if you would accept a PR which moves the default transformations to a configuration option? I found a need to change the default transformations across the board so a config option would be handy 🙂