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

444 views Asked by At

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) {
  config.set({
    basePath: '',
    frameworks: ['mocha'],
    files: [
      'src/**/*spec.js'
    ],
    exclude: [],
    preprocessors: {
      'src/**/*.js': ['babel']
    },
    reporters: ['progress'],
0

There are 0 answers