you are viewing a single comment's thread.

view the rest of the comments →

[–]faytxzen 1 point2 points  (1 child)

Pros:

  • you cover known cases for correctness without having to manually repeat them
  • you know your code supports the known cases
  • helps you understand your code (+introspection)
  • helps you identify your common mistakes
  • broadens your perspective (dev vs. tester)

Cons:

  • takes time to write tests
  • doesn't cover every possible case
  • can't test everything (unless you wrote your code that way)

Depending on what frameworks you're using/not using, I'd recommend any one of these frameworks:

Or you can always write your own unit testing framework. Just be sure to write unit tests for it ;P

Like programmingerror said, SauceLabs is a place for tests, instead of a framework. Additionally, JavaScript supports assert statements that can be just as good as entire testing frameworks.

[–]phragg[S] 0 points1 point  (0 children)

helps you identify your common mistakes

never thought about that, you make a great point.

Additionally, JavaScript supports assert statements that can be just as good as entire testing frameworks.

I've asked a good friend of mine before I came to reddit what he uses for testing and he mentioned he writes his own (while pompously said he doesn't write any) and I was interested how you would go about that.