Skip to content

Commit dd64e9f

Browse files
cexbrayatfilipesilva
authored andcommitted
fix(@schematics/angular): document jasmine options
Currently it can be hard to find how to configure Jasmine in the Karma config. For example, a developer might want to reproduce a randomly failing test with a specific seed. This commit adds some information that may be helpful to beginners.
1 parent 772ec1b commit dd64e9f

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

packages/schematics/angular/application/files/karma.conf.js.template

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ module.exports = function (config) {
1313
require('@angular-devkit/build-angular/plugins/karma')
1414
],
1515
client: {
16+
jasmine: {
17+
// you can add configuration options for Jasmine here
18+
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
19+
// for example, you can disable the random execution with `random: false`
20+
// or set a specific seed with `seed: 4321`
21+
},
1622
clearContext: false // leave Jasmine Spec Runner output visible in browser
1723
},
1824
jasmineHtmlReporter: {

packages/schematics/angular/library/files/karma.conf.js.template

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ module.exports = function (config) {
1313
require('@angular-devkit/build-angular/plugins/karma')
1414
],
1515
client: {
16+
jasmine: {
17+
// you can add configuration options for Jasmine here
18+
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
19+
// for example, you can disable the random execution with `random: false`
20+
// or set a specific seed with `seed: 4321`
21+
},
1622
clearContext: false // leave Jasmine Spec Runner output visible in browser
1723
},
1824
jasmineHtmlReporter: {

0 commit comments

Comments
 (0)