eaf-linter
eaf-linter copied to clipboard
🕵️♂️ Add in Regex Parameter for Finding Testing Files
Idea
We want this library to be as simple to use as possible, but also it needs to be modular and customizable. So, what we need now is the ability for users to configure the path for their testing files. And, this isn't going to be a static path but rather, they are going to specify a regex pattern and we will see if that pattern matches any of their files. If the pattern matches, we will test that file.
Todo
- [ ] Add in a parameter to look for in the
package.json
so people can specify where they want to keep their test files - [ ] Allow them to put in regex as the parameter
- [ ] Replace the current code with their regex when checking for the testing path
Hii @William-McGonagle ,
I am ready to work on this... I think the pattern checking should go inside in the index.js
in test
directory.
Could you please give some clear instructions for the working idea ?
Thank you.
Hey @Criticalcarpet,
Sorry for the late reply. The idea of this whole thing is to just use the path.join() in node.js along with process.cwd(). You can then use this to read the directories for files and if they match certain parameters (like *.js for js files), then use those files.
Thanks, William McGonagle
In which file may I implement this in the test
directory ?
Shall I create a new file with the function ?
@Criticalcarpet-
You can do it however you would like! I'm not super picky as the linter will soon fix formatting, so as long as the implementation works it should be good!
Thanks, William McGonagle