因果报应开始工作,但不因果报应测试

时间:2019-03-15 17:37:22

标签: testing npm webpack karma-jasmine

我假设我的package.json内部的“脚本”中存在某种语法错误。我可以在Powershell内运行.\node_modules\.bin\karma start,业力立即启动,并且可以找到我的test-spec.js,但是我的"test": "./node_modules/karma/bin/karma start karma.conf.js"无法正常工作。当我确实输入npm test时,我会收到'.' is not recognized as an internal or external command这就是我的karma.conf.js中的内容

const webpackConfig = require('./webpack.config.js');

module.exports = function(config) {
  config.set({
    basePath: '',
    frameworks: ['jquery-3.3.1', 'jasmine'],
    files: [
      'src/*.js',
      'spec/*spec.js'
    ],
    webpack: webpackConfig,
    exclude: [
    ],
    preprocessors: {
      'src/*.js': ['webpack'],
      'spec/*spec.js': ['webpack']
    },
    plugins: [
      'karma-jquery',
      'karma-webpack',
      'karma-jasmine',
      'karma-chrome-launcher',
      'karma-jasmine-html-reporter'
    ],
    reporters: ['progress', 'kjhtml'],
    port: 9876,
    colors: true,
    logLevel: config.LOG_INFO,
    autoWatch: true,
    browsers: ['Chrome'],
    singleRun: false,
    concurrency: Infinity
  });
};

0 个答案:

没有答案