You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, one has to provide path to a single test JS file. Can we enhance it to accept either: a pattern (like *test.js) or a folder with test files (like tests/)?
The text was updated successfully, but these errors were encountered:
As you can see by the code itself, once we manage to feed the application with a list of file paths, we are pretty much sorted.
I started playing with the idea of writing a simple glob parser long time ago (pretty much around latest commits on this project), but then eventually I gave up because of other things. I might still have the branch with some scrap-away code somewhere...
The obvious alternative would be using an external library for that (such as node-glob), which is ready made, reliable and tested. It would clash a bit with the zero-dependency idea behind the project, but it's a viable compromise if there is a real need for this framework out there
I also like the idea of zero dependencies, so maybe a very simple parser would be enough? As I said, passing a folder with test files without any patterns might be ideal for some scenarios, at least at the beginning.
By the way, I see that the test npm command calls titef for a folder: titef ./test and I believe it has worked for you. However, it errors in my env (Win 10, Node 10.16.2):
> Executing task: npm run test <
> titef@ test C:\tmp\titef
> node ./bin/titef.js ./test
internal/modules/cjs/loader.js:638
throw err;
^
Error: Cannot find module 'C:\tmp\titef\test'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
Hey @lukaszmn,
I have jotted down a very simple solution for this problem which might be okay for a good chunk of use cases. Not perfect yet, but probably a nice first iteration.
Currently, one has to provide path to a single test JS file. Can we enhance it to accept either: a pattern (like
*test.js
) or a folder with test files (liketests/
)?The text was updated successfully, but these errors were encountered: