Skip to content

Commit

Permalink
feat(config): always ignore the config file itself
Browse files Browse the repository at this point in the history
It's been a very common issue, that people include the config file in the browser, which leads to unexpected errors. There is really no reason to load the config file in the browser.
  • Loading branch information
vojtajina committed Mar 21, 2013
1 parent 00c6e21 commit 103bc0f
Show file tree
Hide file tree
Showing 11 changed files with 3 additions and 40 deletions.
3 changes: 3 additions & 0 deletions lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,9 @@ var parseConfig = function(configFilePath, cliOptions) {
// resolve basePath
config.basePath = path.resolve(path.dirname(configFilePath), config.basePath);

// always ignore the config file itself
config.exclude.push(configFilePath);

return normalizeConfig(config);
};

Expand Down
4 changes: 0 additions & 4 deletions test/e2e/basic/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ files = [
'*.js'
];

exclude = [
'karma.conf.js'
];

autoWatch = true;

browsers = ['Chrome'];
Expand Down
2 changes: 0 additions & 2 deletions test/e2e/coffee/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ files = [
'*.coffee'
];

exclude = [];

autoWatch = true;

browsers = ['Chrome'];
Expand Down
4 changes: 0 additions & 4 deletions test/e2e/coverage/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ files = [
'test/*.js'
];

exclude = [
'karma.conf.js'
];

autoWatch = true;

browsers = ['Chrome']
Expand Down
4 changes: 0 additions & 4 deletions test/e2e/coverageQunit/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ files = [
'test/*.js'
];

exclude = [
'karma.conf.js'
];

autoWatch = true;

browsers = ['Chrome'];
Expand Down
4 changes: 0 additions & 4 deletions test/e2e/coverageRequirejs/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ files = [
{pattern: '*.js', included: false},
];

exclude = [
'karma.conf.js'
];

autoWatch = true;
browsers = ['Chrome'];
singleRun = false;
Expand Down
4 changes: 0 additions & 4 deletions test/e2e/junit/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ files = [
'*.js'
];

exclude = [
'karma.conf.js'
];

autoWatch = true;

browsers = ['Chrome']
Expand Down
4 changes: 0 additions & 4 deletions test/e2e/mocha/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ files = [
'*.js'
];

exclude = [
'karma.conf.js'
];

autoWatch = true;
browsers = ['Chrome'];
singleRun = false;
Expand Down
4 changes: 0 additions & 4 deletions test/e2e/qunit/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ files = [
'*.js'
];

exclude = [
'karma.conf.js'
];

autoWatch = true;

browsers = ['Chrome'];
Expand Down
6 changes: 0 additions & 6 deletions test/e2e/requirejs/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@ files = [
];


// list of files to exclude
exclude = [
'karma.conf.js'
];


// test results reporter to use
// possible values: dots || progress
reporter = 'dots';
Expand Down
4 changes: 0 additions & 4 deletions test/e2e/timeout/karma.conf.ignore.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ files = [
];


// list of files to exclude
exclude = [];


// test results reporter to use
// possible values: 'dots', 'progress', 'junit'
reporters = ['progress'];
Expand Down

1 comment on commit 103bc0f

@sica07
Copy link

@sica07 sica07 commented on 103bc0f Mar 22, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Thank you!

Please sign in to comment.