I am writing a JavaScript library that uses the new es6 promises. I can test the library in Firefox because promises are defined. However, when I try to test my code with Karma
You can use karma-babel-preprocessor for files that uses ES6 features. Install it with
npm install --save-dev karma-babel-preprocessor
and then add specify what files should be preprocessed you karma.conf:
karma.conf
preprocessors: { "src/**/*.js": ["babel"], "test/**/*.js": ["babel"] },