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

Running karma with wildcards => no files are read #852

Closed
negue opened this issue Dec 8, 2013 · 2 comments
Closed

Running karma with wildcards => no files are read #852

negue opened this issue Dec 8, 2013 · 2 comments

Comments

@negue
Copy link

negue commented Dec 8, 2013

Using first time karma.

I have this test-config:

module.exports = function(config) {
    config.set({
        basePath: '../',
        frameworks: ['jasmine', 'requirejs'],
        files: [
         {pattern: 'bower_components/requirejs/require.js'},
         {pattern: 'bower_components/angular/angular.js', watched: false, included: false},
         {pattern: 'bower_components/angular-mocks/angular-mocks.js', watched: false, included: false},
         {pattern: 'app/app.js', included: false},
         {pattern: 'app/**/*.js', included: false, watched: false},
         {pattern: 'test/unit.js', included: false},
            {pattern: 'test/unit/controllersSpec.js', included: false},
            {pattern: 'test/unit/**/*.js', included: false},
            {pattern: 'bower_components/**/*.js', included: false},
            'app/app.require-config.js'
    ],

    autoWatch: true,

    LogLevel: config.LOG_DEBUG,

    browsers: ['Firefox'],

    junitReporter: {
        outputFile: 'test_out/unit.xml',
        suite: 'unit'
    }
    });
};

Without the app/**/*.js the app.require-config.js gets loaded but then can't find any other app/* files, okay adding the line with the app/**/*.js karma starts, nothing gets loaded and node is just spiking the cpu , maybe it tries to load all files but nothing happens...

No errors on the console.

Karma Version: 0.10.8

@vojtajina
Copy link
Contributor

You need to put "app/app.require.config.js" above the "app/*/.js" - first
pattern that matches a file wins, check out
http://karma-runner.github.io/0.10/config/files.html

On Sun, Dec 8, 2013 at 10:00 AM, negue [email protected] wrote:

Using first time karma.

I have this test-config:

module.exports = function(config) {
config.set({
basePath: '../',
frameworks: ['jasmine', 'requirejs'],
files: [
{pattern: 'bower_components/requirejs/require.js'},
{pattern: 'bower_components/angular/angular.js', watched: false, included: false},
{pattern: 'bower_components/angular-mocks/angular-mocks.js', watched: false, included: false},
{pattern: 'app/app.js', included: false},
{pattern: 'app//*.js', included: false, watched: false},
{pattern: 'test/unit.js', included: false},
{pattern: 'test/unit/controllersSpec.js', included: false},
{pattern: 'test/unit/
/.js', included: false},
{pattern: 'bower_components/__/
.js', included: false},
'app/app.require-config.js'
],

autoWatch: true,

LogLevel: config.LOG_DEBUG,

browsers: ['Firefox'],

junitReporter: {
    outputFile: 'test_out/unit.xml',
    suite: 'unit'
}
});

};

Without the app//.js the app.require-config.js gets loaded but then
can't find any other app/
files, okay adding the line with the
app/
/*.js karma starts, nothing gets loaded and node is just spiking
the cpu , maybe it tries to load all files but nothing happens...

No errors on the console.

Karma Version: 0.10.8


Reply to this email directly or view it on GitHubhttps://github.com//issues/852
.

@vojtajina
Copy link
Contributor

I created an issue for special case "exact" patterns as I think it makes sense #853

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