-
Notifications
You must be signed in to change notification settings - Fork 507
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tsdx lint errors out if you have co-located test files (i.e. no test dir) #342
Comments
Having looked more closely at the |
If you look at the output of
Do you think that warning should suggest something more verbose?
|
Yeah, since the value prop of tsdx is zero config like prettier, create-react-app, etc., I assumed it wouldn’t error out for a pretty common setting, and I assumed I wouldn’t have to edit the scripts in package.json this early on. So I think it should more gracefully handle this case by default, and if not that, then putting actionable advice on how to fix the error like in the example output you gave above would be great. This project is very well done - I’m a big fan! Keep up the good work. Hopefully I’ll open a PR or two sometime soon. |
@arthurdenner Perfect, thanks! |
Current Behavior
Added tsdx to a project where test files are in the same dirs as the files under test like this:
... and ran
npm run lint
. This is the error generated:Error: No files matching 'test' were found.
The linter doesn't finish running because of it.
Desired Behavior
Linter doesn't error out due to this project structure.
Suggested Solution
Since this is a common project configuration to ensure you have a test suite per file, either edit the default configuration to support this setup or add a flag to
tsdx create
ortsdx lint
that supports it.Who does this impact? Who is this for?
All users, potentially. Specifically, people who have their test files next to their files under test in their dir structure.
Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered: