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
This thread should help you. According to it, it seems you should try to use PhantomJS2 with ES6.
You can also take a look to this project, which treat to the a near subject than yours.