The purpose of this repository is to learn unit testing with jasmine by looking at some working examples. Once the examples start making sense you can add a few of your own examples and create a pull request.
You will need Node.js installed
Clone this repository using:
git clone https://github.com/MelroyNoronha/jasmine-examples.git
or simply download the zip using this link.
Open a terminal in the jasmine-examples
directory and run:
npm install
You should now be able to run:
jasmine
This will run all the unit tests defined in spec/example.spec.js
Create a file in the jasmine-examples
directory with the following naming scheme:
name-example.js
(replace 'name' with your name)
This file is for the code that you would like to test.
Create a file in the spec
directory with the following naming scheme:
name-example.spec.js
This file is for defining the tests for your code in name-example.js
.