A side effect could be writing to a file,
modifying some global variable, or accidentally wiring all your money to a
The main point is to avoid common pitfalls like sharing state between objects
without any structure, using mutable data types that can be written to by anything,
and not centralizing where your side effects occur.
This principle basically states that you should allow users to
extend the functionality of your module without having to open up the .js source code file and manually manipulate it.
Deciding on what constitutes an adequate amount is up
to your team, but having 100% coverage (all statements and branches) is how
you achieve very high confidence and developer peace of mind.
If your preferred method is
Test Driven Development (TDD), that is great, but the main point is to just
make sure you are reaching your coverage goals before launching any feature,
or refactoring an existing one.