Closed pke closed 5 years ago
you're correct, I will be fixing this in next release
actually @pke this is needed b/c getPaths
will not check if the file index.${ext}
exists. so it is necessary in order to return false.
~to write coverage for this, simply create a folder without an index file~
related to #332 - I am writing a fix so that if subject || html || text don't exist on message then to not send email and throw an error
actually I think you're right, I don't have much time to look right now more at this but if you want to patch please do
I am also a bit short on time right now, need to patch a koa-joi-router-docs package to emit more OpenAPI doc infos, but will come back to this later. I already have 90% code coverage here.
While upping the code coverage I am stuck with this codepath. https://github.com/niftylettuce/email-templates/blob/a296f10818295353e9b34a196340338ac3fe406c/src/index.js#L125
To my understanding,
getPaths
will always return a file, never a folder?So for folders it return
<folder>/index.ext
without further checking if this index file exists. So the check intemplateExists()
is actually never triggered and could be removed?