找不到插件" karma-ie-launcher"

时间:2016-03-15 15:29:50

标签: javascript angularjs node.js karma-runner karma-jasmine

IEC当前我试图为我的角项目设置Karma。 这是我的karma.conf.js文件:



// Karma configuration
// Generated on Fri Mar 04 2016 13:02:47 GMT+0200 (EET)

module.exports = function(config) {
    config.set({

        // base path that will be used to resolve all patterns (eg. files, exclude)
        basePath: '',


        // frameworks to use
        // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
        frameworks: ['jasmine'],

        // list of files / patterns to load in the browser
        files: [
            'app/bower_components/angular/angular.min.js',
            'app/bower_components/angular-ui-router/release/angular-ui-router.min.js',
            'tests/bower_components/angular-mocks/angular-mocks.js',
            'app/js/app.js',
            'app/js/controllers/*.js',
            'tests/unit/*.test.js'
        ],

        plugins : [
            'karma-chrome-launcher',
            'karma-ie-launcher',
            'karma-jasmine'
        ],

        // list of files to exclude
        exclude: [],


        // preprocess matching files before serving them to the browser
        // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
        preprocessors: {},


        // test results reporter to use
        // possible values: 'dots', 'progress'
        // available reporters: https://npmjs.org/browse/keyword/karma-reporter
        reporters: ['progress'],


        // web server port
        port: 9876,


        // enable / disable colors in the output (reporters and logs)
        colors: true,


        // level of logging
        // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
        logLevel: config.LOG_INFO,


        // enable / disable watching file and executing tests whenever any file changes
        autoWatch: true,
 
        // start these browsers
        // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
        browsers: ['IE'],


        // Continuous Integration mode
        // if true, Karma captures browsers, runs the tests and exits
        singleRun: false,

        // Concurrency level
        // how many browser should be started simultaneous
        concurrency: Infinity
    })
}




我已经跑了



SET IE_BIN=C:\Program Files\Internet Explore\iexplore.exe




当我跑步时



karma start --browsers IE




我得到了这个



 karma start --browsers IE
15 03 2016 17:14:53.244:WARN [plugin]: Cannot find plugin "karma-chrome-launcher".
  Did you forget to install it ?
  npm install karma-chrome-launcher --save-dev
15 03 2016 17:14:53.250:WARN [plugin]: Cannot find plugin "karma-ie-launcher".
  Did you forget to install it ?
  npm install karma-ie-launcher --save-dev
15 03 2016 17:14:53.307:WARN [karma]: No captured browser, open http://localhost:9876/
15 03 2016 17:14:53.315:INFO [karma]: Karma v0.13.22 server started at http://localhost:9876/
15 03 2016 17:14:53.316:WARN [launcher]: Can not load "IE", it is not registered!
  Perhaps you are missing some plugin?




你能帮帮我吗?我在ubuntu的配置中没有遇到这样的问题。但不是在Windows上。 提前谢谢。

这是我的package.json



{
  "name": "karmaLearn",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "gulp": "^3.9.1",
    "gulp-angular-protractor": "^0.1.1",
    "jasmine-core": "^2.4.1",
    "karma": "^0.13.21",
    "karma-chrome-launcher": "^0.2.2",
    "karma-ie-launcher": "^0.2.0",
    "karma-jasmine": "^0.3.7"
  },
  "dependencies": {
    "express": "^4.13.4"
  }
}




0 个答案:

没有答案