angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

feat(@angular-devkit/build-angular): expose built-in karma config

Open nicojs opened this issue 3 years ago • 0 comments

PR Checklist

Please check to confirm your PR fulfills the following requirements:

  • [x] The commit message follows our guidelines: https://github.com/angular/angular-cli/blob/main/CONTRIBUTING.md#-commit-message-guidelines
  • [ ] Tests for the changes have been added (for bug fixes / features)
  • [ ] Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • [ ] Bugfix
  • [x] Feature
  • [ ] Code style update (formatting, local variables)
  • [ ] Refactoring (no functional changes, no api changes)
  • [ ] Build related changes
  • [ ] CI related changes
  • [ ] Documentation content changes
  • [ ] Other... Please describe:

What is the current behavior?

Issue Number: #24294

What is the new behavior?

Expose the build-in karma config to anyone that wants to use it.

// karma.conf.js
const setDefaultConfig = require('@angular-devkit/build-angular/src/builders/karma/karma.conf.js');
module.exports = function(config) {
 setDefaultConfig(config);
 config.set({
   // my own custom overrides
 });
}

Does this PR introduce a breaking change?

  • [ ] Yes
  • [x] No

Other information

nicojs avatar Nov 22 '22 20:11 nicojs