Working with Jasmine is quite easy. We have to perform the following steps:
- Download Jasmine 2.0 as a ZIP file from its hosting website on Github (https://github.com/pivotal/jasmine/tree/master/dist).
- Create a folder for the test project.
- Unzip the Jasmine package inside the folder created in step 2.
- Empty the
src subfolders deleting the example files.
- Add some source code to be tested in the
src subfolder as
- Add some testing code using Jasmine in the
spec subfolder as
- Add script references to the files added in steps 5 and 6 to the special file,
SpecRunner.html in a web browser to run the tests and verify the results.
This is clearly not a typical TDD coding cycle. We first write some ...