Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infinite load for some projects #36

Open
cidthecoatrack opened this issue May 2, 2015 · 2 comments
Open

Infinite load for some projects #36

cidthecoatrack opened this issue May 2, 2015 · 2 comments

Comments

@cidthecoatrack
Copy link

Hi Morten, I just recently started using your wonderful ad-on to VS, and I love it! However, I have noticed an odd problem. In one of my VS solutions, the test adapter loads forever and never finishes (green bar always scrolling, "Run All" always grayed out), which means I cannot run any tests.

Here is my karma.conf.js file, which is included in the solution:

// Karma configuration
// Generated on Wed Oct 08 2014 13:34:17 GMT-0400 (Eastern Daylight Time)

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: [
    'DNDGenSite/Scripts/Angular/angular.min.js',
    'DNDGenSite/Scripts/Angular/angular-mocks.js',
    'DNDGenSite/Scripts/app/**/*.module.js',
    'DNDGenSite/Scripts/app/**/*.js',
    'Tests/Unit/Scripts/**'
],


    // 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: {
    },        

    // 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: ['PhantomJS'],

    // Continuous Integration mode
    // if true, Karma captures browsers, runs the tests and exits
    singleRun: true,
    reporters: ['progress', 'junit'],
    junitReporter: {
        outputFile: 'unit-specs.xml',
        suite: 'unit'
    }
});
};

In different solutions, the adapter works just fine - it finds all the Karma tests and auto-runs them, showing them in the test explorer. I'm not sure what the differences are here.

In both solutions, I installed karma via npm install karma --save-dev

Is this an issue with something I have configured, or possible an error in your add-on? If you need any additiona information (or for me to file this in a different place), please say so, and I will be more than willing to oblige :)

Many thanks for a great tool!

@agoodwin
Copy link

This might be a long shot, but I had what seems to be the same issue. My problem was that I had removed the plugins property from the config file (which specified the karma-phantomjs-launcher plugin) at some point and I forgot to re-add it – i.e.

        plugins: [
          'karma-phantomjs-launcher`
        ],

Does adding this to your config file fix your problem?

@cidthecoatrack
Copy link
Author

Unfortunately, I have moved on and am now using Chutzpah instead. Sorry :( But I do know that I that property was not set in my config files, so that could very well have been the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants