Jasmine library ..
SpecRunner.html --> top-level file for setting up and running tests on Jasmine Specs (XXXSpec.js, YYYSpec.js, etc) --> individual spec files container individual tests, as well as Suites of tests
describe --> identifies a "suite" -- that is, a group of related "specs" it --> identifies a spec in a "Test Suite" ... typically colored green
"Typical" test architecture:
expect( add(1, 2) ).toBe( 3 );
- 'expect' is the test identifier ... starts the test process
- 'add(1, 2)' is called the "action/actual?" ... the method we want to test
- 'toBe' is called the "matcher". It is the comparison function we want to use.
- '3' is the "expected value" that we want the matcher to compare against the result from the "action/actual"
The test above can be thought of as symbolizing/testing the following expression:
- add(1,2) === 3;