karma-runner / karma

Spectacular Test Runner for JavaScript
http://karma-runner.github.io
MIT License
11.95k stars 1.71k forks source link

karma 1.0 desn't work well on windows 10 #2223

Open yalishizhude opened 8 years ago

yalishizhude commented 8 years ago

Expected behavior

karma start test/karma.conf.js

connect to socket and watch files

Actual behavior

the console just output: Starting borser PhantomJS

Enviroment Details

// Karma configuration
// Generated on 2016-06-20
'use strict';
module.exports = function (config) {

  config.set({
    // enable / disable watching file and executing tests whenever any file changes
    autoWatch: true,

    // base path, that will be used to resolve files and exclude
    basePath: '../',

    // testing framework to use (jasmine/mocha/qunit/...)
    // as well as any additional frameworks (requirejs/chai/sinon/...)
    frameworks: [
      'jasmine'
    ],

    // list of files / patterns to load in the browser
    files: [
      'app/lib/angular/angular.js',
      'app/lib/angular-ui-router/release/angular-ui-router.js',
      'app/lib/ocLazyLoad/dist/ocLazyLoad.js',
      'app/lib/angular-cookies/angular-cookies.js',
      'app/lib/angular-mocks/angular-mocks.js',
      // bower:js
      // endbower
      'build/core/script/core.js',
      'test/mock/**/*.js',
      'test/unit/**/*.js'
    ],

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

    // web server port
    port: 8080,

    // Start these browsers, currently available:
    // - Chrome
    // - ChromeCanary
    // - Firefox
    // - Opera
    // - Safari (only Mac)
    // - PhantomJS
    // - IE (only Windows)
    browsers: [
      'PhantomJS'
    ],

    // Which plugins to enable
    plugins: [
      'karma-phantomjs-launcher',
      'karma-jasmine',
      "karma-coverage"
    ],

    // Continuous Integration mode
    // if true, it capture browsers, run tests and exit
    singleRun: false,

    colors: true,

    // level of logging
    // possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG
    logLevel: config.LOG_INFO,
    reporters: ['progress', 'coverage'],
    preprocessors: {
      'build/*/script/*.js': ['coverage']
    }

    // Uncomment the following lines if you are using grunt's server to run the tests
    // proxies: {
    //   '/': 'http://localhost:9000/'
    // },
    // URL root prevent conflicts with the site root
    // urlRoot: '_karma_'
  });
};

Steps to reproduce the behaviour

  1. karma start test/karma.conf.js

    plus

OS; win 10 nodejs 4 When I use 0.9 version, it is OK~

dignifiedquire commented 8 years ago

Can you please check if this is still an issue with the latest release?

nicole-ashley commented 8 years ago

I'm getting the same issue on the latest version (1.1.2):

image

We're using phantomjs-prebuilt#2.1.9, installed locally in the project.