Parsimonious testing.
This commit is contained in:
parent
8c96acf0f0
commit
033c3f196d
|
@ -98,8 +98,7 @@ describe "Basic Functionality", ->
|
||||||
for data in test_data
|
for data in test_data
|
||||||
do (data) ->
|
do (data) ->
|
||||||
it "should work with #{data.description}", ->
|
it "should work with #{data.description}", ->
|
||||||
r = tumble(data.input)
|
r = parse(tumble(data.input), data.data)
|
||||||
r = parse(r, data.data)
|
|
||||||
r.should.equal data.output
|
r.should.equal data.output
|
||||||
|
|
||||||
describe "Check for recursion", ->
|
describe "Check for recursion", ->
|
||||||
|
@ -112,8 +111,7 @@ describe "Check for recursion", ->
|
||||||
do (data) ->
|
do (data) ->
|
||||||
it "should catch an exception", ->
|
it "should catch an exception", ->
|
||||||
try
|
try
|
||||||
r = tumble(data.input)
|
r = parse(tumble(data.input), data.data)
|
||||||
r = parse(r, data.data)
|
|
||||||
assert.ok false, "It did not throw the exception"
|
assert.ok false, "It did not throw the exception"
|
||||||
catch err
|
catch err
|
||||||
assert.ok err.id == 'recursion-error', "Recursion depth exeception thrown."
|
assert.ok err.id == 'recursion-error', "Recursion depth exeception thrown."
|
||||||
|
|
Loading…
Reference in New Issue