0.0.14 • Published 10 years ago

beast-test v0.0.14

Weekly downloads
1
License
MIT
Repository
-
Last release
10 years ago

Beast Javascript TestSuite

alt Beast Javascript Logo

create by Shavauhn Gabay

This framework was create to bring a more elegant syntax to Unit Testing in CoffeeScript / Javascript. The aim was to get the code as readible as possible but still allow users to create testcase rapidly and test their application.

####Examples

Inorder to create a new Test class just extend the TestCase class

#coffeescript

MyTest extends TestCase

  constructor:->
    super()     #the super must be called


#base object that is passed to every test method
  base:->
    {
      fname:"Shavauhn"
      lname:"Gabay"
    }

If you want to pass multiple items then you can pass them in an array

#coffeescript

MyTest extends TestCase

  constructor:->
    super()     #the super must be called


#This will pass two items to the test methods
  base:->
    someItem="hello"
    obj = {
      fname:"Shavauhn"
      lname:"Gabay"
    }

    return [someItem,obj]

To defined a test method it is rather easy just name it test_ and fill it with what ever name you want.

    #coffeescript

MyTest extends TestCase

  constructor:->
    super()     #the super must be called


#base object that is passed to every test method
  base:->
    someItem="hello"
    obj = {
      fname:"Shavauhn"
      lname:"Gabay"
    }

    return [someItem,obj]

  testGiveMeBase:(someItem,obj)
    @assertEquals(someItem,"hello") #true

from here on out you can check the API and the Youtube video for more instructions

0.0.14

10 years ago

0.0.13

10 years ago

0.0.12

10 years ago

0.0.11

10 years ago

0.0.10

10 years ago

0.0.9

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago