Azalea is our valiant attempt at writing a JavaScript testing framework from scratch (purely for learning purposes). It is heavily inspired by Jasmine in terms of syntax and how it is run.
* Clone the repo
* Copy Azalea directory into your project directory
* Extract SpecRunner.html from Azalea folder into root directory
* Add source and test files into SpecRunner.html where specified
* Open SpecRunner.html in a browser
- toBe
- toEqual
- toNotEqual
- toContain
- toBeDefined
- toBeNull
Spies work similarly to as they do in Jasmine. An example of how you would use one:
it('using a spy', function() {
Iggy(ObjectUnderTest, 'sayhello').andReturn('hello')
expect(ObjectUnderTest.sayhello()).toEqual('hello');
});
- Running Azalea from command line
- Writing matcher to test if error has been thrown