Skip to content

Using ES6 breaks testing #1081

@drochag

Description

@drochag

I changed all the client code to ES6 with the babel option enabled on the canary branch.

After changing the following file:

'use strict';

angular.module('appName')
  .directive('footer', () => {
    return {
      templateUrl: 'components/footer/footer.html',
      restrict: 'E',
      link: (scope, element) => {
        element.addClass('footer');
      }
    };
  });

I'm getting this error when doing grunt test

INFO [PhantomJS 1.9.8 (Mac OS X 0.0.0)]: Connected on socket DuFkY1bEL9QB0nekjB20 with id 21853607
PhantomJS 1.9.8 (Mac OS X 0.0.0) ERROR
  SyntaxError: Parse error
  at /Users/dan/Documents/projects/centro/client/components/footer/footer.directive.js:4

PhantomJS 1.9.8 (Mac OS X 0.0.0): Executed 0 of 0 ERROR (0.095 secs / 0 secs)

Warning: Task "karma:unit" failed. Use --force to continue.

Aborted due to warnings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions