lib/adapter.js
function(err, System) {
      err = String(err);
      // Look for common issues in the error message, and try to add hints to them
      switch (true) {
        // Some people use ".es6" instead of ".js" for ES6 code
      case /^Error loading ".*\.es6" at .*\.es6\.js/.test(err):
        return err + '\nHint: If you use ".es6" as an extension, ' +
          'add this to your SystemJS paths config: {"*.es6": "*.es6"}';
      case /^TypeError: Illegal module name "\/base\//.test(err):
        return err + '\nHint: Is the working directory different when you run karma?' +
          '\nYou may need to change the baseURL of your SystemJS config inside your karma config.' +
          '\nIt\'s currently checking "' + System.baseURL + '"' +
          '\nNote: "/base/" is where karma serves files from.';
      }

      return err;
    }
function(err, System) {
      err = String(err);
      // Look for common issues in the error message, and try to add hints to them
      switch (true) {
        // Some people use ".es6" instead of ".js" for ES6 code
      case /^Error loading ".*\.es6" at .*\.es6\.js/.test(err):
        return err + '\nHint: If you use ".es6" as an extension, ' +
          'add this to your SystemJS paths config: {"*.es6": "*.es6"}';
      case /^TypeError: Illegal module name "\/base\//.test(err):
        return err + '\nHint: Is the working directory different when you run karma?' +
          '\nYou may need to change the baseURL of your SystemJS config inside your karma config.' +
          '\nIt\'s currently checking "' + System.baseURL + '"' +
          '\nNote: "/base/" is where karma serves files from.';
      }

      return err;
    }
function ( err , System ) { err = String ( err ) ; // Look for common issues in the error message, and try to add hints to them switch ( true ) { // Some people use ".es6" instead of ".js" for ES6 code case / ^Error loading ".*\.es6" at .*\.es6\.js / . test ( err ) : return err + '\nHint: If you use ".es6" as an extension, ' + 'add this to your SystemJS paths config: {"*.es6": "*.es6"}' ; case / ^TypeError: Illegal module name "\/base\/ / . test ( err ) : return err + '\nHint: Is the working directory different when you run karma?' + '\nYou may need to change the baseURL of your SystemJS config inside your karma config.' + '\nIt\'s currently checking "' + System . baseURL + '"' + '\nNote: "/base/" is where karma serves files from.' ; } return err ; }
Checks errors to see if they match known issues, and tries to decorate them
with hints on how to resolve them.
@param err {string}
@param System {object}
@returns {string}
Checks errors to see if they match known issues and tries to decorate them with hints on how to resolve them .