UNPKG

445 Btext/coffeescriptView Raw
1suite 'Debugger', ->
2
3 setup ->
4 @shouldParse = (input) -> doesNotThrow -> parse input
5 @shouldNotParse = (input) -> throws -> parse input
6
7 test 'should parse', ->
8 @shouldParse 'debugger'
9
10 test 'cannot be used as value', ->
11 @shouldNotParse 'x = debugger'
12
13 test 'function with debugger as last statement', ->
14 debugger
15
16 test 'function with conditional debugger as last statement', ->
17 x = true
18 if x then debugger