-
Notifications
You must be signed in to change notification settings - Fork 10
Proposal: Move tests inside component directories #307
Comments
I like this approach as well! But, in case we have many files in a folder (i.e. some sub-components) I prefer to have test files in the sub-folder. I see that, for example, |
Or sub-folders for sub-components? |
@asci or like that. Both options are fine for me. And one more thing: I see an inconsistency in subcomponents structure, i.e. |
@asci approach seems good to me 👍
|
👍 from me, tests should live alongside the code. Also agree with @asci suggestion of subfolders for scoped components. |
One remark from me
|
@AlleeX could you elaborate why separate test files per component method? |
I just created a PR using this new directory structure. |
I am also fine with adding the tests with the components folder structure. Subfolders are also good option for subcomponents. Also having tests folder in the components i think is great idea, simply from the perspective if some component's test get too long to be in 1 file, it can be split in multiple files as @AlleeX suggested... |
Currently
./components/foo
directory./tests/unit/foo
Proposal
Example
Example directory structure:
Why?
Everything related to a particular component can be found in one place. Developer doesn't have to jump around to find tests. Also easier to see if a certain component is missing tests quickly.
The text was updated successfully, but these errors were encountered: