# Do you put tests outside the \`tests/\` folder?

**URL:** <https://discourse.elm-lang.org/t/do-you-put-tests-outside-the-tests-folder/6386>\
**Category:** Request Feedback\
**Created:** [October 9, 2020, 3:37pm UTC](https://discourse.elm-lang.org/t/do-you-put-tests-outside-the-tests-folder/6386 "2020-10-09T15:37:17Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![grigorious](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/grigorious/32/3549_2.png) [@grigorious](https://discourse.elm-lang.org/u/grigorious)\
**Post date:** [October 11, 2020, 7:14pm UTC](https://discourse.elm-lang.org/t/do-you-put-tests-outside-the-tests-folder/6386/7 "2020-10-11T19:14:00Z")

</div>

Thank you for the first point, I did not know that glob was already used. As to the second point that was an error from my part - was looking at my angular code and added `*.spec.elm` automatically - in reality I’m using `ChiSquaredSpec.elm`

The angular style [documentation](https://angular.io/guide/styleguide#unit-test-file-names) rationalises the use of .spec suffix with:

- Provides a consistent way to quickly identify tests.
- Provides pattern matching for test runners

I also like to think of this tests as a sort of documentation - concretely for my modules this documents how some functions behave in edge cases -\> hence **spec** instead of test. (The ChiSquared module uses a distribution table - so it is useful to define what happens when a value is not found in the table and so on …)

---

_[View the full topic](https://discourse.elm-lang.org/t/do-you-put-tests-outside-the-tests-folder/6386)._
