title: Karma. SyntaxError: Expected an identifier but found ... instead
body: <p>I recently updated an angularjs project from 1.3 to 1.5 which uses ES6, my tests use karma when I run grunt karma I get the following error:</p>
  
  <pre><code>  SyntaxError: Expected an identifier but found 'url' instead
    at target/grunt/components/variants/variants.js:52
  </code></pre>
  
  <p>The line 52 from variants.js is :<code>let url = foo.com;</code>
  before when it was <code>var url = foo.com</code>  it worked.</p>
  
  <p>How to make karma support ES6?</p>
  
  <p>this is my <code>karma.conf.js</code>file:</p>
  
  <pre><code>module.exports = function(config) {
    config.set({
  
      basePath : '',
  
      autoWatch : false,
  
      frameworks : ['jasmine'],
  
      browsers : ['PhantomJS'],
  
      plugins : [
        'karma-jasmine',
        'karma-phantomjs-launcher',
        'karma-chrome-launcher',
        'karma-firefox-launcher',
        'karma-junit-reporter'
      ],
  
      singleRun : true,
  
      reporters: ['progress', 'junit'],
  
      junitReporter : {
        outputFile: 'target/test-karma/unit.xml',
        suite: 'unit'
      },
  
      // Define log level. Possible values: LOG_DISABLE, LOG_ERROR, LOG_WARN, LOG_INFO, LOG_DEBUG
      logLevel: config.LOG_INFO
    });
  };
  </code></pre>
  
  <p>And in <code>package.json</code> this are my <code>devDependencies</code> related with karma:</p>
  
  <pre><code>  "grunt-karma": "~2.0.0",
      "grunt-notify": "~0.4.5",
      "grunt-script-link-tags": "~1.0.2",
      "http-server": "~0.9.0",
      "jasmine-core": "~2.5.2",
      "karma": "~1.5.0",
      "karma-jasmine": "~1.1.0",
      "karma-junit-reporter": "~1.2.0",
      "karma-phantomjs-launcher": "~1.0",
      "karma-chrome-launcher": "~2.0",
      "karma-firefox-launcher": "~1.0",
  </code></pre>