am-lunch-time
Test development using parameters.
this is renamed from am-lunch-test.
sample code
testListPage.html
testListPage.coffee
generate = require"am-lunch-time/browser/generate"testcases = clickTest: click1: "?click1" click2: "?click2" apiTest: api1: "?api1" api2: newApi1: "?api2&newApi=0" newApi2: "?api2&newApi=1"generatetestcases
link pages
This module watch event of console.assert.
It will end result in an error at the time of console.assert() is false.
All passed the test by putting the console.info after it was true ( "finished").
sample
if locationsearch is "?click1" consoleassert1 + 1 consoleassert1 - 1"error" consoleinfo"finished"else locationsearch is "?click2" consoleassert1 + 0 consoleassert1 - 0"error" consoleinfo"finished"
use Test class with am-autoevent
Test = require"am-lunch-time" newTest = autoEvent = Test::AutoEvent newTeststart : => @autoEvent = new @AutoEvent @autoEventregister : @autoEventwait100clickselector : @autoEventwait100addEvent=> num = parseIntnumStr consoleassertnum autoEventstart
API
TODO