eaf-linter icon indicating copy to clipboard operation
eaf-linter copied to clipboard

🕵️‍♂️ Add in Regex Parameter for Finding Testing Files

Open William-McGonagle opened this issue 3 years ago • 4 comments

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

William-McGonagle avatar Jan 01 '22 16:01 William-McGonagle

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.

Criticalcarpet avatar Mar 09 '22 01:03 Criticalcarpet

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

William-McGonagle avatar Mar 14 '22 18:03 William-McGonagle

In which file may I implement this in the test directory ? Shall I create a new file with the function ?

Criticalcarpet avatar Mar 18 '22 04:03 Criticalcarpet

@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

William-McGonagle avatar Mar 20 '22 17:03 William-McGonagle