-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(config): pass the config object rather than a wrapper
**The reasons for this change:** 1/ easier to override config properties The config object was not exposed and karma.configure() only does shallow merge. Now, this is possible, eg. config.sauceLabs.testName = 'overridden'; This is helpful especially when using multiple config files (eg. a shared config between multiple projects or having a per developer config file that overrides project defaults). 2/ declarative definition of custom launchers/preprocessors/reporters makes more consistent and therefore easier to explain. 3/ declarative definition of custom launchers/preprocessors/reporters also makes it possible to use these with grunt-karma or from JSON config file. The change is done in a backwards compatible manner, if one use old APIs such as karma.configure() or karma.defineLauncher(), it works. Only warning is displayed. These extra APIs will be removed in v0.10.0. BREAKING CHANGE: please update your karma.conf.js as follows: // before: module.exports = function(karma) { karma.configure({port: 123}); karma.defineLauncher('x', 'Chrome', { flags: ['--disable-web-security'] }); karma.definePreprocessor('y', 'coffee', { bare: false }); karma.defineReporter('z', 'coverage', { type: 'html' }); }; // after: module.exports = function(config) { config.set({ port: 123, customLaunchers: { 'x': { base: 'Chrome', flags: ['--disable-web-security'] } }, customPreprocessors: { 'y': { base: 'coffee', bare: false } }, customReporters: { 'z': { base: 'coverage', type: 'html' } } }); };
- Loading branch information
Showing
16 changed files
with
145 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.