Closed formsandlines closed 1 year ago
I should enable a test runner on CI, but for now you can run tests locally with bb test
. If possible, it would be good to add a test for this PR as well.
Oh well, seems like the test for migrate
fails, because tags are now ordered before the post title in the document after calling api/migrate
. I don’t know what causes this, but I’ll see if I can fix it.
I only tested the behavior of the new
command with various tags/defaults in a separate project, but will try to add tests as well, if I can figure out how to set them up correctly.
I think you can change the test by splitting the lines and comparing the set of both lines.
Just changed the failing test according to your suggestion, which I hope I understood correctly. I wasn’t sure what exactly “migrate” does and if the order is important.
Thanks and congrats with your first merged PR :)
Glad I could help, had to learn some new things about Git and GitHub along the way. :D
The default tag will still remain
"clojure"
, but users can change it by adding:default-metadata {:tags […]}
to theiropts
map in bb.edn, which also enables them to add multiple default tags or none at all (with an empty vector). I hope my changes are aligned with the intended use of:default-metadata
.For a single post, users can just add
--tags
without any arguments to omit tags even if the default vector is not empty. Maybe there could also be an option--no-tags
for clarity of intent, but I don’t think it’s necessary.