Questions tagged [karma-babel-preprocessor]

A karma preprocessor for working with the Babel transpiler.

Preprocessor to compile ES6 on the fly with babel. https://www.npmjs.com/package/karma-babel-preprocessor

5 questions
42
votes
5 answers

RegeneratorRuntime is not defined

I am trying to run Karma-babel-preprocessor and a straight forward ES6 generator: //require('babel/polyfill'); describe("how Generators work", function() { it("will allow generator functions", function() { /*function * numbers() { …
P.Brian.Mackey
  • 43,228
  • 68
  • 238
  • 348
6
votes
2 answers

Babelify project with typescript and karma

Setup and goal Typescript project, with typescript mocha tests. Project should be transpiled from Typescript to ES6 and then transformed via Babel for several shippable bundles. I'd like to run all tests in browser via Karma (and eventually…
4
votes
0 answers

Karma-babel require is not defined, even when not using require

I have this: import assert from 'assert'; import foo from './foo'; describe('Array', function() { but when running karma I get the error require is not defined even when not using require. any ideas? module.exports = function (config) { …
SuperUberDuper
  • 9,242
  • 9
  • 39
  • 72
1
vote
0 answers

Karma Coverage (Jasmine, Babel, Webpack)

After making changes to my karma.conf.js to allow for Karma Coverage, running karma now fails. I'm not really sure what is going on. Any thoughts? process.env.NODE_ENV = 'test'; module.exports = function(config) { config.set({ autoWatch:…
0
votes
1 answer

Karma runner with Coverage - preprocessor not working on Javascript ES6 code

I just recently started working with Karma runner in our UI5 app. Wrote some unit tests, ran them... all worked fine so far. However, now I´ve decided to track the code coverage. To measure it, I need to run preprocessor on my source code. And this…