Skip to content

kkavita92/azalea

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is Azalea?

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.

How To Run Azalea?

* 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

Matchers

  • toBe
  • toEqual
  • toNotEqual
  • toContain
  • toBeDefined
  • toBeNull

Spies

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');
  });

Upcoming Features:

  • Running Azalea from command line
  • Writing matcher to test if error has been thrown

Contributor(s):

About

JS Testing Library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published