即使不使用require,也没有定义Karma-babel要求

时间:2016-11-15 12:26:25

标签: karma-runner karma-mocha karma-babel-preprocessor

我有这个:

import assert from 'assert';
import foo from './foo';

describe('Array', function() {

但是当运行业力时,即使不使用require,也会收到错误require is not defined

任何想法?

module.exports = function (config) {
  config.set({
    basePath: '',
    frameworks: ['mocha'],
    files: [
      'src/**/*spec.js'
    ],
    exclude: [],
    preprocessors: {
      'src/**/*.js': ['babel']
    },
    reporters: ['progress'],

0 个答案:

没有答案