ibrik
ibrik copied to clipboard
Error: Syntax error: unexpected '\''
I generated some code using Yeoman (Angular generator with coffeescript). Karma tests are running, I'm trying to add the code coverage task.
It looks like ibrik cannot parse properly the generated code. Why? Is this a bug?
The output is:
Transformation error; return original code
Error: Syntax error on line 11, column 14: unexpected '\'' (\u0027)
08 : # Controller of the app
09 : ###
10 : angular.module('app')
11 : .controller 'MycontrollerCtrl', ($scope) ->
^^ :~~~~~~~~~~~~~^
12 : $scope.awesomeThings = [
13 : 'HTML5 Boilerplate'
14 : 'AngularJS'
at Object.CoffeeScript.parse (/usr/local/lib/node_modules/ibrik/node_modules/coffee-script-redux/lib/module.js:61:13)
at Instrumenter.instrumentSync (/usr/local/lib/node_modules/ibrik/lib/instrumenter.js:58:22)
at /usr/local/lib/node_modules/ibrik/lib/hook.js:20:25
at Object.require.extensions..coffee (/usr/local/lib/node_modules/ibrik/lib/hook.js:48:13)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at runFn (/usr/local/lib/node_modules/ibrik/lib/cover.js:50:21)
at /usr/local/lib/node_modules/ibrik/lib/cover.js:102:14
at /usr/local/lib/node_modules/ibrik/node_modules/istanbul/lib/util/file-matcher.js:56:16
No coverage information was collected, exit without writing coverage information
I'm having the same issue with a two-callback construct:
[Error: Syntax error on line 22, column 2: unexpected ',' (\u002C)
19 :
20 : @auth.login('[email protected]', 'bar').then (res) ->
21 : response = res
22 : , (err) ->
^^ :~~^
23 : console.error err