faker
faker copied to clipboard
Reorganize test file locations
Move test files into src folder with <module-name>.spec.ts or reorganize the test folder with subfolders
We wait with this until all functions are located in their separate file.
Example:
- src
- [...]
- modules
- address
- city.ts
- city.spec.ts
- street.ts
- street.spec.ts
- [...]
- animal
- cat.ts
- cat.spec.ts
- dog.ts
- dog.spec.ts
- [...]
- [...]
- address
Is this still how we intend to implement this?
Is this still how we intend to implement this?
Not that sure. I'm in favor of staying in the test folder, so the test files don't accidentally bleed into dist.
Is this still how we intend to implement this?
Let's discuss this in the next team meeting (?)
i like having all the tests in one folder seperate to src, it makes it easy to search all the test code.
Pro
- Tests are easier to find
- The structure of your test directory matches your src directory, because they are in one directory
Con
- Test files may bleed into dist
- Test snapshots folders in every source module folder
- Need a separate folder for common tests e.g. locale-data.spec.ts
Team Decision
- We keep the tests in a separate test folder.
- We can reopen this issue, if we want to reevaluate this design decision.