From 5a0940e62d57aad49e369976408278bb992eca7b Mon Sep 17 00:00:00 2001 From: cexbrayat Date: Thu, 12 Nov 2020 14:26:35 +0100 Subject: [PATCH] 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. --- .../angular/application/files/karma.conf.js.template | 6 ++++++ .../schematics/angular/library/files/karma.conf.js.template | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/packages/schematics/angular/application/files/karma.conf.js.template b/packages/schematics/angular/application/files/karma.conf.js.template index 8c012eef57..ecfc22f615 100644 --- a/packages/schematics/angular/application/files/karma.conf.js.template +++ b/packages/schematics/angular/application/files/karma.conf.js.template @@ -13,6 +13,12 @@ module.exports = function (config) { require('@angular-devkit/build-angular/plugins/karma') ], client: { + jasmine: { + // you can add configuration options for Jasmine here + // the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html + // for example, you can disable the random execution with `random: false` + // or set a specific seed with `seed: 4321` + }, clearContext: false // leave Jasmine Spec Runner output visible in browser }, jasmineHtmlReporter: { diff --git a/packages/schematics/angular/library/files/karma.conf.js.template b/packages/schematics/angular/library/files/karma.conf.js.template index 7d8d58d393..0cefa1c1d1 100644 --- a/packages/schematics/angular/library/files/karma.conf.js.template +++ b/packages/schematics/angular/library/files/karma.conf.js.template @@ -13,6 +13,12 @@ module.exports = function (config) { require('@angular-devkit/build-angular/plugins/karma') ], client: { + jasmine: { + // you can add configuration options for Jasmine here + // the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html + // for example, you can disable the random execution with `random: false` + // or set a specific seed with `seed: 4321` + }, clearContext: false // leave Jasmine Spec Runner output visible in browser }, jasmineHtmlReporter: {