Skip to content

Commit

Permalink
Merge pull request strongloop#3173 from strongloop/fix/strong-remotin…
Browse files Browse the repository at this point in the history
…g-in-karma

Fix Karma config to babelify node_modules too
  • Loading branch information
bajtos authored Feb 1, 2017
2 parents 76dd35e + 3c209ee commit db3c7b6
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions test/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,32 @@ module.exports = function(config) {
'supertest',
],
transform: [
['babelify', {presets: 'es2015'}],
['babelify', {
presets: 'es2015',
// By default, browserify does not transform node_modules
// As a result, our dependencies like strong-remoting and juggler
// are kept in original ES6 form that does not work in PhantomJS
global: true,
// Prevent SyntaxError in strong-task-emitter:
// strong-task-emitter/lib/task.js (83:4):
// arguments is a reserved word in strict mode
// Prevent TypeError in chai:
// 'caller', 'callee', and 'arguments' properties may not be
// accessed on strict mode functions or the arguments objects
// for calls to them
// Prevent TypeError in loopback-datasource-juggler:
// 'caller', 'callee', and 'arguments' properties may not be
// accessed on strict mode functions or the arguments objects
// for calls to them
ignore: /node_modules\/(strong-task-emitter|chai|loopback-datasource-juggler)\//,
}],
],
debug: true,
// noParse: ['jquery'],
watch: true,
},

// Add browserify to preprocessors
preprocessors: {'test/*': ['browserify']},
preprocessors: {'test/**/*.js': ['browserify']},
});
};

0 comments on commit db3c7b6

Please sign in to comment.