js2coffee
Version:
JavaScript to CoffeeScript compiler
1,436 lines (1,163 loc) • 58 kB
Plain Text
Errors
✓ throws them properly
Error cases
✓ happens on "with" statements
✓ happens on break-less cases
Helpers
✓ delimit
parse()
✓ works
specs:
Arrays:
✓ Empty array
✓ Multiple items
Comments:
✓ Block comments
✓ Block comments with space
✓ Line comments
✓ Trailing line comment
Errors:
✓ No finally
✓ Try catch finally
Function calls:
✓ Call with function expression
✓ Call with function then object
✓ Call with object
✓ Call with param after function
✓ Chaining
✓ Expression with call
✓ Iife with different argument names
Functions:
✓ Multiple declarations
✓ Multiple expressions
✓ Nested declarations
✓ Nested declares
✓ Return statement
✓ With arguments
If:
✓ Else if
✓ If blocks
✓ If statement
✓ If with else
✓ If with else if inside functions
✓ If with else inside functions
✓ If with nesting
✓ Multiple else ifs
✓ Non block consequents
Legacy:
✓ Array literals
✓ Assign
✓ Blank lines
✓ Crlf
✓ Debugger
✓ Delete
✓ Do
✓ Empty function
✓ Empty semicolon
✓ Floating point numbers
✓ Increment decrement
✓ Simple addition
✓ Single return
✓ Throw
✓ Unary
✓ Undefined
Legacy pending:
1) Anon invocation
2) Assignment
3) Bitwise shift
4) Blank regex
5) Block comments
6) Call statement
7) Destructuring assignment
8) Destructuring in functions
9) Dont unreserve property accessors
10) Empty catch
11) Empty function bodies
12) Equal regex
13) Escape
14) Existence
15) For
16) For continue
17) For in
18) Function chaining
19) Function order
20) Function property
21) Function with keyword
22) Hash
23) If return
✓ Index
24) Instanceof
25) Invocation object literal first
26) Jquery wrapper
27) Loop
28) No return
29) Not
30) Not not
31) Numbers
32) Object literal at index
33) Object literal return
34) Object literal single
35) Object literal with function
36) Object literals
37) Or
38) Parenthesized new
39) Percent d
40) Pretty arrays
41) Prototype
42) Reserve
43) Return function
44) Return in if
45) Return object
46) Return object parenthesize
47) Returns
48) Settimeout
49) Single line else
50) Single line if
51) Single line while
52) Single quotes
53) Switch
54) Switch gt two
55) Switch indent tab
56) Ternary
57) This attribute
58) This keyword
59) Unless bug
60) Unusual identifiers
61) Var
62) While
Loops:
✓ Continue statement
✓ Do while
✓ Do while with other statements
✓ For with no arguments
✓ For with no body
✓ For with no init
✓ For with no test
✓ For with no update
✓ Forever loop
✓ Simple for
✓ While
✓ While with break
Members:
✓ Identifier in brackets
✓ Identifiers
New:
✓ New operator
✓ New operator with arguments
✓ New with complex callee
✓ New with function expression
✓ New with function expression and string
Objects:
✓ Arrray of objects
✓ Call with object
✓ Multiple properties
✓ Nested objects
✓ Object with arrays
✓ Simple object
Pending:
63) Call with multiple objects
64) Case consolidation
65) Empty while
66) Iife functions
67) Parentheses
68) Parenthesized json
69) Prototype
70) Single object expression
Simple:
✓ Booleans
✓ Call with function
✓ Debugger statement
✓ Delete
✓ Empty statement
✓ Empty statement with other statements
✓ Function call
✓ Function call with arguments
✓ Increment
✓ Indented throw
✓ Index resolution
✓ Index resolution of expression
✓ Index resolution of strings
✓ Index resolution witH this
✓ Inline assignment
✓ Nested function calls
✓ Nesting if and assignment
✓ Prefix increment
✓ Return nothing
✓ Scientific notation
✓ Sequence expression
✓ Sequence expression with indent
✓ Standalone this
✓ Ternary operator
✓ Ternary operator nesting
✓ This prefix
✓ Throw
✓ Unary void
✓ Undefined
Strings:
✓ Empty string
✓ Simple string
✓ Single quotes
✓ String with escapes
Switch:
✓ Switch
✓ Switch with comments
✓ Switch with return
Var:
✓ Mixed var declarations
✓ Multiple var declaration
✓ Multiple var declarations with indent
✓ Var declaration
✓ Var without initializer
Unsupported
thowing unsupported errors
✓ happens for with()
✓ happens with labelled statements
✓ happens with naked JSON objects
Walker
✓ works
122 passing (457ms)
70 failing
1) specs: Legacy pending: Anon invocation:
expected '(($) ->\n return $\n) jQuery\n(($) ->\n return $\n)()\n' to equal '(($) ->\n $\n) jQuery\n(($) ->\n $\n)()\n'
+ expected - actual
(($) ->
+ $
- return $
) jQuery
(($) ->
+ $
- return $
)()
2) specs: Legacy pending: Assignment:
expected 'off = 2\n' to equal 'off_ = 2\n'
+ expected - actual
+off_ = 2
-off = 2
3) specs: Legacy pending: Bitwise shift:
expected 'value = value & 255 << 16 | value & 65280 | value & 16711680 >>> 16\n' to equal 'value = ((value & 255) << 16) | (value & 65280) | ((value & 16711680) >>> 16)\n'
+ expected - actual
+value = ((value & 255) << 16) | (value & 65280) | ((value & 16711680) >>> 16)
-value = value & 255 << 16 | value & 65280 | value & 16711680 >>> 16
4) specs: Legacy pending: Blank regex:
expected '/ /g\n' to equal 'RegExp(" ", "g")\n'
+ expected - actual
+RegExp(" ", "g")
-/ /g
5) specs: Legacy pending: Block comments:
expected '' to equal '# OPTIONS: {"no_comments": "false"}\n###*\nAPI documentation\n###'
+ expected - actual
+# OPTIONS: {"no_comments": "false"}
+###*
+API documentation
+###
6) specs: Legacy pending: Call statement:
expected 'x = ->\n alert 2 + 2\n alert y(10)\n$.get\n ajax: true\n url: \'foo\'\n' to equal 'x = ->\n alert 2 + 2\n alert y(10)\n return\n$.get\n ajax: true\n url: "foo"\n'
+ expected - actual
x = ->
alert 2 + 2
alert y(10)
+ return
$.get
ajax: true
+ url: "foo"
- url: 'foo'
7) specs: Legacy pending: Destructuring assignment:
Error: input.js:1:6: Invalid left-hand side in assignment
1 [a,b] = [b,a];
-----^
at exports.buildError (/Users/rsc/Projects/@incubate/js2coffee-redux/lib/helpers.coffee:72:13)
at Function.js2coffee.parse (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:47:11)
at module.exports.js2coffee (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:23:13)
at Context.<anonymous> (/Users/rsc/Projects/@incubate/js2coffee-redux/test/specs.coffee:35:22)
at callFn (/Users/rsc/Projects/@incubate/js2coffee-redux/node_modules/mocha/lib/runnable.js:249:21)
at Test.Runnable.run (/Users/rsc/Projects/@incubate/js2coffee-redux/node_modules/mocha/lib/runnable.js:242:7)
at Runner.runTest (/Users/rsc/Projects/@incubate/js2coffee-redux/node_modules/mocha/lib/runner.js:373:10)
at /Users/rsc/Projects/@incubate/js2coffee-redux/node_modules/mocha/lib/runner.js:451:12
at next (/Users/rsc/Projects/@incubate/js2coffee-redux/node_modules/mocha/lib/runner.js:298:14)
at /Users/rsc/Projects/@incubate/js2coffee-redux/node_modules/mocha/lib/runner.js:308:7
at next (/Users/rsc/Projects/@incubate/js2coffee-redux/node_modules/mocha/lib/runner.js:246:23)
at Object._onImmediate (/Users/rsc/Projects/@incubate/js2coffee-redux/node_modules/mocha/lib/runner.js:275:5)
at processImmediate [as _immediateCallback] (timers.js:330:15)
8) specs: Legacy pending: Destructuring in functions:
Error: input.js:1:11: Unexpected token [
1 (function([a]){return true;});
----------^
at exports.buildError (/Users/rsc/Projects/@incubate/js2coffee-redux/lib/helpers.coffee:72:13)
at Function.js2coffee.parse (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:47:11)
at module.exports.js2coffee (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:23:13)
at Context.<anonymous> (/Users/rsc/Projects/@incubate/js2coffee-redux/test/specs.coffee:35:22)
at callFn (/Users/rsc/Projects/@incubate/js2coffee-redux/node_modules/mocha/lib/runnable.js:249:21)
at Test.Runnable.run (/Users/rsc/Projects/@incubate/js2coffee-redux/node_modules/mocha/lib/runnable.js:242:7)
at Runner.runTest (/Users/rsc/Projects/@incubate/js2coffee-redux/node_modules/mocha/lib/runner.js:373:10)
at /Users/rsc/Projects/@incubate/js2coffee-redux/node_modules/mocha/lib/runner.js:451:12
at next (/Users/rsc/Projects/@incubate/js2coffee-redux/node_modules/mocha/lib/runner.js:298:14)
at /Users/rsc/Projects/@incubate/js2coffee-redux/node_modules/mocha/lib/runner.js:308:7
at next (/Users/rsc/Projects/@incubate/js2coffee-redux/node_modules/mocha/lib/runner.js:246:23)
at Object._onImmediate (/Users/rsc/Projects/@incubate/js2coffee-redux/node_modules/mocha/lib/runner.js:275:5)
at processImmediate [as _immediateCallback] (timers.js:330:15)
9) specs: Legacy pending: Dont unreserve property accessors:
expected 'io.on \'data\', ->\n console.log "Received"\n@on \'data\', ->\n console.log "Received"\n' to equal 'io.on "data", ->\n console.log "Received"\n return\n\n@on "data", ->\n console.log "Received"\n return\n'
+ expected - actual
+io.on "data", ->
-io.on 'data', ->
console.log "Received"
+ return
+
+@on "data", ->
-@on 'data', ->
console.log "Received"
+ return
10) specs: Legacy pending: Empty catch:
expected 'try\n alert "OK"\ncatch e\n' to equal 'try\n alert "OK"\n'
+ expected - actual
try
alert "OK"
-catch e
11) specs: Legacy pending: Empty function bodies:
expected 'x =\n v: ->\n return 2\n\n y: ->\n\n z: ->\n' to equal 'x =\n v: ->\n 2\n\n y: ->\n\n z: ->\n'
+ expected - actual
x =
v: ->
+ 2
- return 2
y: ->
z: ->
12) specs: Legacy pending: Equal regex:
expected 're = /=/\nconsole.log \'a = b\'.match(re)\n' to equal 're = RegExp("=")\nconsole.log "a = b".match(re)\n\n'
+ expected - actual
+re = RegExp("=")
+console.log "a = b".match(re)
+
-re = /=/
-console.log 'a = b'.match(re)
13) specs: Legacy pending: Escape:
expected 'foo = \'bar\'\nobj = \n key: "value"\n escape: "rock\'n roll"\n escapeAnother: "rock\\"n roll"\n "array": [\n "one"\n 2\n \'tree\'\n ]\n \'mixed\': "hello" + foo\n \'empty foo bar\': \'\'\n "js-has-no-string-formatting": "#{foo}" + \'#{foo}\'\n' to equal 'foo = "bar"\nobj =\n key: "value"\n escape: "rock\'n roll"\n escapeAnother: "rock\\"n roll"\n array: [\n "one"\n 2\n "tree"\n ]\n mixed: "hello" + foo\n "empty foo bar": ""\n "js-has-no-string-formatting": \'#{foo}\' + \'#{foo}\'\n'
+ expected - actual
+foo = "bar"
+obj =
-foo = 'bar'
-obj =
key: "value"
escape: "rock'n roll"
escapeAnother: "rock\"n roll"
+ array: [
- "array": [
"one"
2
+ "tree"
- 'tree'
]
+ mixed: "hello" + foo
+ "empty foo bar": ""
+ "js-has-no-string-formatting": '#{foo}' + '#{foo}'
- 'mixed': "hello" + foo
- 'empty foo bar': ''
- "js-has-no-string-formatting": "#{foo}" + '#{foo}'
14) specs: Legacy pending: Existence:
expected 'ifChecks = ->\n if x\n yep\n if !x\n yep\nifNullChecks = ->\n if x == null\n yep\n if x === null\n nah\n if obj.x == null\n yep\nvoidChecks = ->\n if x == void 0\n yep\n if x === void 0\n nah\n if x == void 1\n yep\nundefinedChecks = ->\n if typeof x == \'undefined\'\n nah\n if x == `undefined`\n yep\n if obj.x == `undefined`\n nah\nedgeCase = ->\n if !x == y\n nah\nunlessChecks = ->\n if x != null\n yep\n if x !== null\n nah\n if typeof x != \'undefined\'\n wat\n if x != `undefined`\n nah\n if obj.x != `undefined`\n wat\nwhileAndFor = ->\n while x == null\n yep\n while x === null\n yep\n a\nwhile x == null\n yep\n 2\n' to equal 'ifChecks = ->\n yep if x\n yep unless x\n return\nifNullChecks = ->\n yep unless x?\n nah if x is null\n yep unless obj.x?\n return\nvoidChecks = ->\n yep unless x?\n nah if x is undefined\n yep unless x?\n return\nundefinedChecks = ->\n nah if typeof x is "undefined"\n yep unless x?\n nah unless obj.x?\n return\nedgeCase = ->\n nah if not x is y\n return\nunlessChecks = ->\n yep if x?\n nah if x isnt null\n wat unless typeof x is "undefined"\n nah if x?\n wat if obj.x?\n return\nwhileAndFor = ->\n yep until x?\n yep while x is null\n a\n while not x?\n yep\n 2\n return\n'
+ expected - actual
ifChecks = ->
+ yep if x
+ yep unless x
+ return
- if x
- yep
- if !x
- yep
ifNullChecks = ->
+ yep unless x?
+ nah if x is null
+ yep unless obj.x?
+ return
- if x == null
- yep
- if x === null
- nah
- if obj.x == null
- yep
voidChecks = ->
+ yep unless x?
+ nah if x is undefined
+ yep unless x?
+ return
- if x == void 0
- yep
- if x === void 0
- nah
- if x == void 1
- yep
undefinedChecks = ->
+ nah if typeof x is "undefined"
+ yep unless x?
+ nah unless obj.x?
+ return
- if typeof x == 'undefined'
- nah
- if x == `undefined`
- yep
- if obj.x == `undefined`
- nah
edgeCase = ->
+ nah if not x is y
+ return
- if !x == y
- nah
unlessChecks = ->
+ yep if x?
+ nah if x isnt null
+ wat unless typeof x is "undefined"
+ nah if x?
+ wat if obj.x?
+ return
- if x != null
- yep
- if x !== null
- nah
- if typeof x != 'undefined'
- wat
- if x != `undefined`
- nah
- if obj.x != `undefined`
- wat
whileAndFor = ->
+ yep until x?
+ yep while x is null
- while x == null
- yep
- while x === null
- yep
a
+ while not x?
-while x == null
yep
2
+ return
15) specs: Legacy pending: For:
expected 'x = 0\nwhile !x < 2\n alert 1\n x++\nwhile !x < 2\n alert 1\nloop\n alert 1\n ++x\nloop\n alert 1\n' to equal 'x = 0\nwhile not x < 2\n alert 1\n x++\nwhile not x < 2\n alert 1\nloop\n alert 1\n ++x\nloop\n alert 1\n'
+ expected - actual
x = 0
+while not x < 2
-while !x < 2
alert 1
x++
+while not x < 2
-while !x < 2
alert 1
loop
alert 1
++x
16) specs: Legacy pending: For continue:
Error: input.js:13:3: No break or return statement found in a case
11 alert("one");
12 break;
13 case 2:
--^
at exports.buildError (/Users/rsc/Projects/@incubate/js2coffee-redux/lib/helpers.coffee:72:13)
at Builder.syntaxError (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:159:11)
at Builder.removeBreaksFromConsequents (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:542:10)
at Builder.removeBreaksFromConsequents (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:1:1)
at Builder.SwitchCase (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:469:6)
at Builder.module.exports.Walker.walk (/Users/rsc/Projects/@incubate/js2coffee-redux/lib/walker.coffee:35:16)
at /Users/rsc/Projects/@incubate/js2coffee-redux/lib/walker.coffee:1:1
at Array.map (native)
at Builder.makeStatements (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:263:21)
at /Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:465:24
at Builder.indent (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:114:16)
at Builder.SwitchStatement (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:465:13)
at Builder.module.exports.Walker.walk (/Users/rsc/Projects/@incubate/js2coffee-redux/lib/walker.coffee:35:16)
at /Users/rsc/Projects/@incubate/js2coffee-redux/lib/walker.coffee:1:1
at Array.map (native)
at Builder.makeStatements (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:263:21)
at Builder.BlockStatement (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:259:6)
at Builder.module.exports.Walker.walk (/Users/rsc/Projects/@incubate/js2coffee-redux/lib/walker.coffee:35:16)
at Builder.walk (/Users/rsc/Projects/@incubate/js2coffee-redux/lib/walker.coffee:1:1)
at body (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:483:21)
at Builder.indent (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:114:16)
at Builder.ForStatement (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:483:8)
at Builder.module.exports.Walker.walk (/Users/rsc/Projects/@incubate/js2coffee-redux/lib/walker.coffee:35:16)
at /Users/rsc/Projects/@incubate/js2coffee-redux/lib/walker.coffee:1:1
at Array.map (native)
at Builder.makeStatements (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:263:21)
at Builder.BlockStatement (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:259:6)
at Builder.Program (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:173:6)
at Builder.module.exports.Walker.walk (/Users/rsc/Projects/@incubate/js2coffee-redux/lib/walker.coffee:35:16)
at Builder.walk (/Users/rsc/Projects/@incubate/js2coffee-redux/lib/walker.coffee:1:1)
at Builder.module.exports.Walker.run (/Users/rsc/Projects/@incubate/js2coffee-redux/lib/walker.coffee:17:6)
at Builder.get (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:128:6)
at Function.js2coffee.parse (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:51:27)
at module.exports.js2coffee (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:23:13)
at Context.<anonymous> (/Users/rsc/Projects/@incubate/js2coffee-redux/test/specs.coffee:35:22)
at callFn (/Users/rsc/Projects/@incubate/js2coffee-redux/node_modules/mocha/lib/runnable.js:249:21)
at Test.Runnable.run (/Users/rsc/Projects/@incubate/js2coffee-redux/node_modules/mocha/lib/runnable.js:242:7)
at Runner.runTest (/Users/rsc/Projects/@incubate/js2coffee-redux/node_modules/mocha/lib/runner.js:373:10)
at /Users/rsc/Projects/@incubate/js2coffee-redux/node_modules/mocha/lib/runner.js:451:12
at next (/Users/rsc/Projects/@incubate/js2coffee-redux/node_modules/mocha/lib/runner.js:298:14)
at /Users/rsc/Projects/@incubate/js2coffee-redux/node_modules/mocha/lib/runner.js:308:7
at next (/Users/rsc/Projects/@incubate/js2coffee-redux/node_modules/mocha/lib/runner.js:246:23)
at Object._onImmediate (/Users/rsc/Projects/@incubate/js2coffee-redux/node_modules/mocha/lib/runner.js:275:5)
at processImmediate [as _immediateCallback] (timers.js:330:15)
17) specs: Legacy pending: For in:
Error: input.js:1:0: ForInStatement is not supported
1 for (x in y) { alert(1) }
^
at exports.buildError (/Users/rsc/Projects/@incubate/js2coffee-redux/lib/helpers.coffee:72:13)
at Builder.syntaxError (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:159:11)
at Builder.onUnknownNode (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:149:6)
at Builder.module.exports.Walker.walk (/Users/rsc/Projects/@incubate/js2coffee-redux/lib/walker.coffee:38:14)
at /Users/rsc/Projects/@incubate/js2coffee-redux/lib/walker.coffee:1:1
at Array.map (native)
at Builder.makeStatements (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:263:21)
at Builder.BlockStatement (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:259:6)
at Builder.Program (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:173:6)
at Builder.module.exports.Walker.walk (/Users/rsc/Projects/@incubate/js2coffee-redux/lib/walker.coffee:35:16)
at Builder.walk (/Users/rsc/Projects/@incubate/js2coffee-redux/lib/walker.coffee:1:1)
at Builder.module.exports.Walker.run (/Users/rsc/Projects/@incubate/js2coffee-redux/lib/walker.coffee:17:6)
at Builder.get (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:128:6)
at Function.js2coffee.parse (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:51:27)
at module.exports.js2coffee (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:23:13)
at Context.<anonymous> (/Users/rsc/Projects/@incubate/js2coffee-redux/test/specs.coffee:35:22)
at callFn (/Users/rsc/Projects/@incubate/js2coffee-redux/node_modules/mocha/lib/runnable.js:249:21)
at Test.Runnable.run (/Users/rsc/Projects/@incubate/js2coffee-redux/node_modules/mocha/lib/runnable.js:242:7)
at Runner.runTest (/Users/rsc/Projects/@incubate/js2coffee-redux/node_modules/mocha/lib/runner.js:373:10)
at /Users/rsc/Projects/@incubate/js2coffee-redux/node_modules/mocha/lib/runner.js:451:12
at next (/Users/rsc/Projects/@incubate/js2coffee-redux/node_modules/mocha/lib/runner.js:298:14)
at /Users/rsc/Projects/@incubate/js2coffee-redux/node_modules/mocha/lib/runner.js:308:7
at next (/Users/rsc/Projects/@incubate/js2coffee-redux/node_modules/mocha/lib/runner.js:246:23)
at Object._onImmediate (/Users/rsc/Projects/@incubate/js2coffee-redux/node_modules/mocha/lib/runner.js:275:5)
at processImmediate [as _immediateCallback] (timers.js:330:15)
18) specs: Legacy pending: Function chaining:
expected '$("#foo").css(opacity: 0).css(\n left: 0\n right: 0).highlight().animate opacity: 1\n$("#foo").css(opacity: 0).css(\n left: 0\n right: 0).highlight().animate\n opacity: 1\n left: 20, 3\n' to equal '$("#foo").css(opacity: 0).css(\n left: 0\n right: 0\n).highlight().animate opacity: 1\n$("#foo").css(opacity: 0).css(\n left: 0\n right: 0\n).highlight().animate\n opacity: 1\n left: 20\n, 3\n'
+ expected - actual
$("#foo").css(opacity: 0).css(
left: 0
+ right: 0
+).highlight().animate opacity: 1
- right: 0).highlight().animate opacity: 1
$("#foo").css(opacity: 0).css(
left: 0
+ right: 0
+).highlight().animate
- right: 0).highlight().animate
opacity: 1
+ left: 20
+, 3
- left: 20, 3
19) specs: Legacy pending: Function order:
expected 'x = ->\n alert y()\n z = ->\n return 3\n\n y = ->\n return 2\n\n' to equal 'x = ->\n y = ->\n 2\n alert y()\n z = ->\n 3\n\n return\n'
+ expected - actual
x = ->
+ y = ->
+ 2
alert y()
z = ->
+ 3
- return 3
+ return
- y = ->
- return 2
-
20) specs: Legacy pending: Function property:
expected '(->\n).apa\nf = (->\n).bind(this)\n' to equal '(->\n).apa\nf = (->\n).bind(this)'
+ expected - actual
(->
).apa
f = (->
+).bind(this)
-).bind(this)
21) specs: Legacy pending: Function with keyword:
expected 'x = ->\n' to equal 'x = ->\n \n'
+ expected - actual
x = ->
+
22) specs: Legacy pending: Hash:
expected 'x =\n a: 2\n b: 3\n c: one: 1\nconsole.log\n two: 2\n three: 3\n' to equal 'x =\n a: 2\n b: 3\n c:\n one: 1\n\nconsole.log\n two: 2\n three: 3\n'
+ expected - actual
x =
a: 2
b: 3
+ c:
+ one: 1
+
- c: one: 1
console.log
two: 2
three: 3
23) specs: Legacy pending: If return:
expected 'bar = ->\n if 1\n return 1\nfoo = ->\n if 1\n return 1\nbaz = ->\n if 1\n return 2\n else\n return 1\n' to equal 'bar = ->\n 1 if 1\nfoo = ->\n 1 if 1\nbaz = ->\n if 1\n 2\n else\n 1\n'
+ expected - actual
bar = ->
+ 1 if 1
- if 1
- return 1
foo = ->
+ 1 if 1
- if 1
- return 1
baz = ->
if 1
+ 2
- return 2
else
+ 1
- return 1
24) specs: Legacy pending: Instanceof:
expected '0 instanceof a\n!1 instanceof a\n!!2 instanceof a\n!!!3 instanceof a\nif a instanceof b\n 4\nif !a instanceof b\n 5\n!6 instanceof a || b\n!7 instanceof a + b\nif !a instanceof b || c\n 8\nif !a instanceof b + c\n 9\n' to equal '0 instanceof a\n(1 not instanceof a)\n!!(2 instanceof a)\n(3 not instanceof a)\n4 if a instanceof b\n5 unless a instanceof b\n(6 not instanceof a) or b\n(7 not instanceof a) + b\n8 if (a not instanceof b) or c\n9 if (a not instanceof b) + c\n'
+ expected - actual
0 instanceof a
+(1 not instanceof a)
+!!(2 instanceof a)
+(3 not instanceof a)
+4 if a instanceof b
+5 unless a instanceof b
+(6 not instanceof a) or b
+(7 not instanceof a) + b
+8 if (a not instanceof b) or c
+9 if (a not instanceof b) + c
-!1 instanceof a
-!!2 instanceof a
-!!!3 instanceof a
-if a instanceof b
- 4
-if !a instanceof b
- 5
-!6 instanceof a || b
-!7 instanceof a + b
-if !a instanceof b || c
- 8
-if !a instanceof b + c
- 9
25) specs: Legacy pending: Invocation object literal first:
expected 'test url: url, options || {}\n' to equal 'test\n url: url\n, options or {}\n'
+ expected - actual
+test
+ url: url
+, options or {}
-test url: url, options || {}
26) specs: Legacy pending: Jquery wrapper:
expected '(($) ->\n return new (jQuery.fn.init)(selector, context)\n) jQuery\n' to equal '(($) ->\n new jQuery.fn.init(selector, context)\n) jQuery\n'
+ expected - actual
(($) ->
+ new jQuery.fn.init(selector, context)
- return new (jQuery.fn.init)(selector, context)
) jQuery
27) specs: Legacy pending: Loop:
expected 'loop\nloop\n x()\nwhile 100\nwhile 100\n x()\nwhile 0.0\n x()\nwhile 0.01\n x()\n' to equal 'loop\n continue\nloop\n x()\nloop\n continue\nloop\n x()\nx() while 0.0\nloop\n x()\n'
+ expected - actual
loop
+ continue
loop
x()
+loop
+ continue
+loop
-while 100
-while 100
x()
+x() while 0.0
+loop
-while 0.0
x()
-while 0.01
- x()
28) specs: Legacy pending: No return:
expected 'noReturn = ->\n f()\nnoReturnIf1 = ->\n if condition\n doSomething()\n return 1\n else\n doSomethingElse()\nnoReturnIf2 = ->\n if condition\n doSomething()\n else\n doSomethingElse()\n return 2\n' to equal 'noReturn = ->\n f()\n return\nnoReturnIf1 = ->\n if condition\n doSomething()\n 1\n else\n doSomethingElse()\n return\nnoReturnIf2 = ->\n if condition\n doSomething()\n else\n doSomethingElse()\n 2\n return\n'
+ expected - actual
noReturn = ->
f()
+ return
noReturnIf1 = ->
if condition
doSomething()
+ 1
- return 1
else
doSomethingElse()
+ return
noReturnIf2 = ->
if condition
doSomething()
else
doSomethingElse()
+ 2
+ return
- return 2
29) specs: Legacy pending: Not:
expected '!a\n' to equal 'not a\n'
+ expected - actual
+not a
-!a
30) specs: Legacy pending: Not not:
expected '!x\n!!x\n!!!x\n!!!!x\n!!!!!x\n' to equal 'not x\n!!x\nnot x\n!!x\nnot x\n'
+ expected - actual
+not x
-!x
!!x
+not x
+!!x
+not x
-!!!x
-!!!!x
-!!!!!x
31) specs: Legacy pending: Numbers:
expected 'x = 1E3\n' to equal 'x = 1e3'
+ expected - actual
+x = 1e3
-x = 1E3
32) specs: Legacy pending: Object literal at index:
expected 'o = {}\no[\n a: 1\n b: 2] = 3\no[c: 4] = 5\n' to equal 'o = {}\no[{\n a: 1\n b: 2\n}] = 3\no[c: 4] = 5\n'
+ expected - actual
o = {}
+o[{
-o[
a: 1
+ b: 2
+}] = 3
- b: 2] = 3
o[c: 4] = 5
33) specs: Legacy pending: Object literal return:
expected '->\n return\n a: 1\n b: 2\n' to equal '->\n a: 1\n b: 2\n'
+ expected - actual
->
+ a: 1
+ b: 2
- return
- a: 1
- b: 2
34) specs: Legacy pending: Object literal single:
expected 'a: 1\n\n x: 2\n b: 2\n' to equal 'a: 1\n(\n x: 2\n b: 2\n)\n'
+ expected - actual
a: 1
+(
-
x: 2
b: 2
+)
35) specs: Legacy pending: Object literal with function:
expected 'x = (->\n)(\n a: 2\n b: 3)\n' to equal 'x = ->\n(\n a: 2\n b: 3\n)\n'
+ expected - actual
+x = ->
+(
-x = (->
-)(
a: 2
+ b: 3
+)
- b: 3)
36) specs: Legacy pending: Object literals:
expected 'x =\n x: 2\n b: 2\n$.get\n x: 2\n b: 2\n data: 2: \'post\'\n lol: [\n 2\n 3\n ], 2\n' to equal 'x =\n x: 2\n b: 2\n\n$.get\n x: 2\n b: 2\n data:\n 2: "post"\n\n lol: [\n 2\n 3\n ]\n, 2\n'
+ expected - actual
x =
x: 2
b: 2
+
$.get
x: 2
b: 2
+ data:
+ 2: "post"
+
- data: 2: 'post'
lol: [
2
3
+ ]
+, 2
- ], 2
37) specs: Legacy pending: Or:
expected 'a = 2 || {}\n' to equal 'a = 2 or {}\n'
+ expected - actual
+a = 2 or {}
-a = 2 || {}
38) specs: Legacy pending: Parenthesized new:
expected 'new Date.getTime()\n' to equal '(new Date).getTime()\n'
+ expected - actual
+(new Date).getTime()
-new Date.getTime()
39) specs: Legacy pending: Percent d:
expected '(->\n console.log "Listening to %d", port\n)()\n' to equal '(->\n console.log "Listening to %d", port\n return\n)()\n'
+ expected - actual
(->
console.log "Listening to %d", port
+ return
)()
40) specs: Legacy pending: Pretty arrays:
expected 'module.exports = foo: bar:\n empty: []\n oneElement: [ "one" ]\n mixed: [\n 1\n 2\n 3\n "four"\n "five"\n ]\n nestedArray: [\n "1"\n "2"\n [\n "3.1"\n "3.2"\n [\n "3.3.1"\n "3.3.2"\n ]\n ]\n "4"\n "5"\n ]\n nestedMix: [\n {\n k1: 1\n k2: 2\n k3:\n \'k4a\': true\n \'k4b\': [\n \'i\'\n \'ii\'\n ]\n }\n "k5"\n {\n k6: 6\n k7: 7\n }\n {\n k8: 8\n k9: 9\n }\n "k10"\n ]\n' to equal 'module.exports = foo:\n bar:\n empty: []\n oneElement: ["one"]\n mixed: [\n 1\n 2\n 3\n "four"\n "five"\n ]\n nestedArray: [\n "1"\n "2"\n [\n "3.1"\n "3.2"\n [\n "3.3.1"\n "3.3.2"\n ]\n ]\n "4"\n "5"\n ]\n nestedMix: [\n {\n k1: 1\n k2: 2\n k3:\n k4a: true\n k4b: [\n "i"\n "ii"\n ]\n }\n "k5"\n {\n k6: 6\n k7: 7\n }\n {\n k8: 8\n k9: 9\n }\n "k10"\n ]'
+ expected - actual
+module.exports = foo:
+ bar:
+ empty: []
+ oneElement: ["one"]
+ mixed: [
+ 1
+ 2
+ 3
+ "four"
+ "five"
+ ]
+ nestedArray: [
+ "1"
+ "2"
-module.exports = foo: bar:
- empty: []
- oneElement: [ "one" ]
- mixed: [
- 1
- 2
- 3
- "four"
- "five"
- ]
- nestedArray: [
- "1"
- "2"
- [
- "3.1"
- "3.2"
[
+ "3.1"
+ "3.2"
+ [
+ "3.3.1"
+ "3.3.2"
+ ]
- "3.3.1"
- "3.3.2"
]
+ "4"
+ "5"
]
+ nestedMix: [
+ {
+ k1: 1
+ k2: 2
+ k3:
+ k4a: true
+ k4b: [
+ "i"
+ "ii"
+ ]
+ }
+ "k5"
+ {
+ k6: 6
+ k7: 7
+ }
+ {
+ k8: 8
+ k9: 9
+ }
+ "k10"
+ ]
- "4"
- "5"
- ]
- nestedMix: [
- {
- k1: 1
- k2: 2
- k3:
- 'k4a': true
- 'k4b': [
- 'i'
- 'ii'
- ]
- }
- "k5"
- {
- k6: 6
- k7: 7
- }
- {
- k8: 8
- k9: 9
- }
- "k10"
- ]
41) specs: Legacy pending: Prototype:
expected 'X.prototype = a: b\n@prototype = a: b\nX.prototype.a = a: b\n@prototype.b = a: b\n' to equal 'X:: = a: b\n@:: = a: b\nX::a = a: b\n@::b = a: b\n'
+ expected - actual
+X:: = a: b
+@:: = a: b
+X::a = a: b
+@::b = a: b
-X.prototype = a: b
-@prototype = a: b
-X.prototype.a = a: b
-@prototype.b = a: b
42) specs: Legacy pending: Reserve:
expected 'off = false\nfoo off\neval \'off\'\narguments\n' to equal 'off_ = false\nfoo off_\neval "off"\narguments'
+ expected - actual
+off_ = false
+foo off_
+eval "off"
+arguments
-off = false
-foo off
-eval 'off'
-arguments
43) specs: Legacy pending: Return function:
expected '->\n return ->\n return 2\n\n' to equal '->\n ->\n 2\n'
+ expected - actual
->
+ ->
+ 2
- return ->
- return 2
-
44) specs: Legacy pending: Return in if:
expected 'x = ->\n if true\n return 2\n b = 3\n return b\n' to equal 'x = ->\n return 2 if true\n b = 3\n b\n\n'
+ expected - actual
x = ->
+ return 2 if true
- if true
- return 2
b = 3
+ b
+
- return b
45) specs: Legacy pending: Return object:
expected 'a = ->\n console.log "Hello"\n return\n a: 1\n b: 2\nb = ->\n console.log "Hello"\n return a: 1\nc = ->\n return\n a: 1\n b: 2\nd = ->\n c: 3\n return\n a: 1\n b: 2\n' to equal 'a = ->\n console.log "Hello"\n a: 1\n b: 2\nb = ->\n console.log "Hello"\n a: 1\nc = ->\n a: 1\n b: 2\nd = ->\n c: 3\n (\n a: 1\n b: 2\n )\n'
+ expected - actual
a = ->
console.log "Hello"
+ a: 1
+ b: 2
- return
- a: 1
- b: 2
b = ->
console.log "Hello"
+ a: 1
- return a: 1
c = ->
+ a: 1
+ b: 2
- return
- a: 1
- b: 2
d = ->
c: 3
+ (
- return
a: 1
b: 2
+ )
46) specs: Legacy pending: Return object parenthesize:
expected 'parenthesized = ->\n return\n a: 1\n b: 2\n a()\nnot_parenthesized = ->\n return a: 1\n a()\nparenthesized_b = ->\n if something()\n return\n a: 1\n b: 2\nparenthesized_c = ->\n if something()\n return\n a: 1\n b: 2\n a()\n' to equal 'parenthesized = ->\n return (\n a: 1\n b: 2\n )\n a()\n return\nnot_parenthesized = ->\n return a: 1\n a()\n return\nparenthesized_b = ->\n if something()\n a: 1\n b: 2\nparenthesized_c = ->\n if something()\n return (\n a: 1\n b: 2\n )\n a()\n return\n'
+ expected - actual
parenthesized = ->
+ return (
- return
a: 1
b: 2
+ )
a()
+ return
not_parenthesized = ->
return a: 1
a()
+ return
parenthesized_b = ->
if something()
+ a: 1
+ b: 2
- return
- a: 1
- b: 2
parenthesized_c = ->
if something()
+ return (
- return
a: 1
b: 2
+ )
a()
+ return
47) specs: Legacy pending: Returns:
expected 'x = ->\n if foo\n return 1\n return true\n else\n return 2\n return false\ny = ->\n return 100\n return 200\nz = ->\n switch foo\n when X\n return 1\n return 2\n when Y\n return 3\n return 4\n else\n return 5\n return 6\n' to equal 'x = ->\n if foo\n return 1\n true\n else\n return 2\n false\ny = ->\n return 100\n 200\nz = ->\n switch foo\n when X\n return 1\n 2\n when Y\n return 3\n 4\n else\n return 5\n 6\n'
+ expected - actual
x = ->
if foo
return 1
+ true
- return true
else
return 2
+ false
- return false
y = ->
return 100
+ 200
- return 200
z = ->
switch foo
when X
return 1
+ 2
- return 2
when Y
return 3
+ 4
- return 4
else
return 5
+ 6
- return 6
48) specs: Legacy pending: Settimeout:
expected 'setTimeout (->\n return foo()\n), 500\nalert setTimeout((->\n return foo()\n), 500)\ncall ->\n return foo()\n' to equal 'setTimeout (->\n foo()\n), 500\nalert setTimeout(->\n foo()\n, 500)\ncall ->\n foo()\n'
+ expected - actual
setTimeout (->
+ foo()
- return foo()
), 500
+alert setTimeout(->
+ foo()
+, 500)
-alert setTimeout((->
- return foo()
-), 500)
call ->
+ foo()
- return foo()
49) specs: Legacy pending: Single line else:
expected 'if x != 2 && 2\n 2\n 2\nelse\n true\n' to equal 'if (x isnt 2) and (2)\n 2\n 2\nelse\n true\n'
+ expected - actual
+if (x isnt 2) and (2)
-if x != 2 && 2
2
2
else
true
50) specs: Legacy pending: Single line if:
expected 'if x\n 2\n' to equal '2 if x\n'
+ expected - actual
+2 if x
-if x
- 2
51) specs: Legacy pending: Single line while:
expected 'while something\n foo()\nwhile something\n foo()\n bar()\nwhile !something\n foo()\nwhile !something\n foo()\n bar()\n' to equal 'foo() while something\nwhile something\n foo()\n bar()\nfoo() until something\nuntil something\n foo()\n bar()\n'
+ expected - actual
+foo() while something
while something
foo()
-while something
- foo()
bar()
+foo() until something
+until something
-while !something
foo()
-while !something
- foo()
bar()
52) specs: Legacy pending: Single quotes:
expected 'foo = \'bar\'\nobj = \n key: "value"\n escape: \'rock\\\'n roll "escaped" strings\'\n "array": [\n "one"\n 2\n \'tree\'\n ]\n \'mixed\': "hello" + foo\n \'empty foo bar\': \'\'\n "js-has-no-string-formatting": "#{foo}" + \'#{foo}\'\n' to equal 'foo = \'bar\'\nobj =\n key: \'value\'\n escape: \'rock\\\'n roll "escaped" strings\'\n array: [\n \'one\'\n 2\n \'tree\'\n ]\n mixed: \'hello\' + foo\n \'empty foo bar\': \'\'\n \'js-has-no-string-formatting\': \'#{foo}\' + \'#{foo}\'\n'
+ expected - actual
foo = 'bar'
+obj =
+ key: 'value'
-obj =
- key: "value"
escape: 'rock\'n roll "escaped" strings'
+ array: [
+ 'one'
- "array": [
- "one"
2
'tree'
]
+ mixed: 'hello' + foo
- 'mixed': "hello" + foo
'empty foo bar': ''
+ 'js-has-no-string-formatting': '#{foo}' + '#{foo}'
- "js-has-no-string-formatting": "#{foo}" + '#{foo}'
53) specs: Legacy pending: Switch:
Error: input.js:2:13: No break or return statement found in a case
1 switch (x) { case 2: a; break; case 3: b; break; default: x; }
2 switch (x) { case 2: case 3: b; break; default: x; }
------------^
at exports.buildError (/Users/rsc/Projects/@incubate/js2coffee-redux/lib/helpers.coffee:72:13)
at Builder.syntaxError (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:159:11)
at Builder.removeBreaksFromConsequents (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:542:10)
at Builder.removeBreaksFromConsequents (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:1:1)
at Builder.SwitchCase (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:469:6)
at Builder.module.exports.Walker.walk (/Users/rsc/Projects/@incubate/js2coffee-redux/lib/walker.coffee:35:16)
at /Users/rsc/Projects/@incubate/js2coffee-redux/lib/walker.coffee:1:1
at Array.map (native)
at Builder.makeStatements (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:263:21)
at /Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:465:24
at Builder.indent (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:114:16)
at Builder.SwitchStatement (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:465:13)
at Builder.module.exports.Walker.walk (/Users/rsc/Projects/@incubate/js2coffee-redux/lib/walker.coffee:35:16)
at /Users/rsc/Projects/@incubate/js2coffee-redux/lib/walker.coffee:1:1
at Array.map (native)
at Builder.makeStatements (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:263:21)
at Builder.BlockStatement (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:259:6)
at Builder.Program (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:173:6)
at Builder.module.exports.Walker.walk (/Users/rsc/Projects/@incubate/js2coffee-redux/lib/walker.coffee:35:16)
at Builder.walk (/Users/rsc/Projects/@incubate/js2coffee-redux/lib/walker.coffee:1:1)
at Builder.module.exports.Walker.run (/Users/rsc/Projects/@incubate/js2coffee-redux/lib/walker.coffee:17:6)
at Builder.get (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:128:6)
at Function.js2coffee.parse (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:51:27)
at module.exports.js2coffee (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:23:13)
at Context.<anonymous> (/Users/rsc/Projects/@incubate/js2coffee-redux/test/specs.coffee:35:22)
at callFn (/Users/rsc/Projects/@incubate/js2coffee-redux/node_modules/mocha/lib/runnable.js:249:21)
at Test.Runnable.run (/Users/rsc/Projects/@incubate/js2coffee-redux/node_modules/mocha/lib/runnable.js:242:7)
at Runner.runTest (/Users/rsc/Projects/@incubate/js2coffee-redux/node_modules/mocha/lib/runner.js:373:10)
at /Users/rsc/Projects/@incubate/js2coffee-redux/node_modules/mocha/lib/runner.js:451:12
at next (/Users/rsc/Projects/@incubate/js2coffee-redux/node_modules/mocha/lib/runner.js:298:14)
at /Users/rsc/Projects/@incubate/js2coffee-redux/node_modules/mocha/lib/runner.js:308:7
at next (/Users/rsc/Projects/@incubate/js2coffee-redux/node_modules/mocha/lib/runner.js:246:23)
at Object._onImmediate (/Users/rsc/Projects/@incubate/js2coffee-redux/node_modules/mocha/lib/runner.js:275:5)
at processImmediate [as _immediateCallback] (timers.js:330:15)
54) specs: Legacy pending: Switch gt two:
Error: input.js:2:1: No break or return statement found in a case
1 switch (x) {
2 case 1:
^
at exports.buildError (/Users/rsc/Projects/@incubate/js2coffee-redux/lib/helpers.coffee:72:13)
at Builder.syntaxError (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:159:11)
at Builder.removeBreaksFromConsequents (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:542:10)
at Builder.removeBreaksFromConsequents (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:1:1)
at Builder.SwitchCase (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:469:6)
at Builder.module.exports.Walker.walk (/Users/rsc/Projects/@incubate/js2coffee-redux/lib/walker.coffee:35:16)
at /Users/rsc/Projects/@incubate/js2coffee-redux/lib/walker.coffee:1:1
at Array.map (native)
at Builder.makeStatements (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:263:21)
at /Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:465:24
at Builder.indent (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:114:16)
at Builder.SwitchStatement (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:465:13)
at Builder.module.exports.Walker.walk (/Users/rsc/Projects/@incubate/js2coffee-redux/lib/walker.coffee:35:16)
at /Users/rsc/Projects/@incubate/js2coffee-redux/lib/walker.coffee:1:1
at Array.map (native)
at Builder.makeStatements (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:263:21)
at Builder.BlockStatement (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:259:6)
at Builder.Program (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:173:6)
at Builder.module.exports.Walker.walk (/Users/rsc/Projects/@incubate/js2coffee-redux/lib/walker.coffee:35:16)
at Builder.walk (/Users/rsc/Projects/@incubate/js2coffee-redux/lib/walker.coffee:1:1)
at Builder.module.exports.Walker.run (/Users/rsc/Projects/@incubate/js2coffee-redux/lib/walker.coffee:17:6)
at Builder.get (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:128:6)
at Function.js2coffee.parse (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:51:27)
at module.exports.js2coffee (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:23:13)
at Context.<anonymous> (/Users/rsc/Projects/@incubate/js2coffee-redux/test/specs.coffee:35:22)
at callFn (/Users/rsc/Projects/@incubate/js2coffee-redux/node_modules/mocha/lib/runnable.js:249:21)
at Test.Runnable.run (/Users/rsc/Projects/@incubate/js2coffee-redux/node_modules/mocha/lib/runnable.js:242:7)
at Runner.runTest (/Users/rsc/Projects/@incubate/js2coffee-redux/node_modules/mocha/lib/runner.js:373:10)
at /Users/rsc/Projects/@incubate/js2coffee-redux/node_modules/mocha/lib/runner.js:451:12
at next (/Users/rsc/Projects/@incubate/js2coffee-redux/node_modules/mocha/lib/runner.js:298:14)
at /Users/rsc/Projects/@incubate/js2coffee-redux/node_modules/mocha/lib/runner.js:308:7
at next (/Users/rsc/Projects/@incubate/js2coffee-redux/node_modules/mocha/lib/runner.js:246:23)
at Object._onImmediate (/Users/rsc/Projects/@incubate/js2coffee-redux/node_modules/mocha/lib/runner.js:275:5)
at processImmediate [as _immediateCallback] (timers.js:330:15)
55) specs: Legacy pending: Switch indent tab:
Error: input.js:3:13: No break or return statement found in a case
1 // OPTIONS: {"indent": "\t"}
2 switch (x) { case 2: a; break; case 3: b; break; default: x; }
3 switch (x) { case 2: case 3: b; break; default: x; }
------------^
at exports.buildError (/Users/rsc/Projects/@incubate/js2coffee-redux/lib/helpers.coffee:72:13)
at Builder.syntaxError (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:159:11)
at Builder.removeBreaksFromConsequents (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:542:10)
at Builder.removeBreaksFromConsequents (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:1:1)
at Builder.SwitchCase (/Users/rsc/Projects/@incubate/js2coffee-redux/js2coffee.coffee:469:6)
at Builder.module.exports.Walker.walk (