codecombat/aether — pull request #39 by walkingtospace (2014-03-24 16:47:07+00:00)
Title: added coffee script test cases & modified canTranspile() 

added test cases:
describe "CS Test Spec #1", ->
aether = new Aether language: "coffeescript"
it "mathmetics order", ->
code = "
return (2*2 + 2/2 - 2*2/2)
"
aether.transpile(code)
expect(aether.run()).toEqual 3

describe "CS Test Spec #2", ->
aether = new Aether language: "coffeescript"
it "function call", ->
code = """
fib = (n) ->
(if n < 2 then n else fib(n - 1) + fib(n - 2))
chupacabra = fib(6)
"""
aether.transpile(code)
fn = aether.createFunction()
expect(aether.canTranspile(code)).toEqual true
expect(aether.run()).toEqual 8 # fail

and modified canTransplie() to pass CS (need to add CS lint later)

Test case #2 is always failed. I think we need to work more for Coffeescript in aether.