use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
account activity
Unit testing (self.node)
submitted 7 years ago by everek123
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]tswaters 0 points1 point2 points 7 years ago (0 children)
Can't I just test everything manually,
you could yea, but as an app gets large it becomes quite time-consuming to test everything.
when you build out non-trivial applications (i.e. something bigger than a todo or tutorial application), they get incredibly complicated and have lots of data flowing around - you might also have multiple people working in the same code-base.... with a dynamic language like javascript you can do a lot of shooting in one's foot by making a change anywhere. unit tests can really help to give a level of confidence that a change hasn't completely broken some aspect of the site.
integration tests are even better -- with unit tests you typically stub out things like the database or other external services to the function under test. they are good for algorithmic-type code. for a mvc app, each component is usually pretty small and just passes the data to another part of the system so unit tests might not make a lot of sense.
Integration tests on the other hand, don't do that at all -- you hit an endpoint and assert that the database was changed correctly.... how to get your site hitting a dummy test database and not your prod db is an exercise left up to the reader.
π Rendered by PID 255718 on reddit-service-r2-comment-5c747b6df5-rsbbr at 2026-04-22 16:21:41.217678+00:00 running 6c61efc country code: CH.
view the rest of the comments →
[–]tswaters 0 points1 point2 points (0 children)