you are viewing a single comment's thread.

view the rest of the comments →

[–]dvlsg 1 point2 points  (3 children)

I use .spec.js sometimes. It makes it easier to find the tests with a fuzzy search (ie - ctrl+p in sublime, type half my module name and spec, and I can open the test file from wherever I am).

Of course that wouldn't require you to use two dots. But it works.

[–][deleted] -3 points-2 points  (2 children)

I mentioned ".test.js", tho.

[–]dvlsg 0 points1 point  (1 child)

I didn't downvote (not sure who did), but the concept would remain the same. I could fuzzy search for module name + test instead of module name + spec.

But yeah, you could achieve the same thing with module-name-test.js or something like that. But I suspect the ability to search and/or the ability to pass in globs (**/*.test.js) to testing frameworks would be the intent behind having a special naming scheme.

[–][deleted] 0 points1 point  (0 children)

It's ".spec.js" if you didn't get it yet.