Skip to content
This repository has been archived by the owner on Jun 22, 2023. It is now read-only.

Added codeCoverageThreshold documentation #18

Merged
merged 2 commits into from
Jan 24, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/app/learn/reference/configuration/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<p>When you <a routerLink="/learn/get-started/basics/create-project">create a SKY UX project</a>, the SKY UX template provides a <stache-code>skyuxconfig.json</stache-code> file in your project's directory to enable you to configure settings for SKY UX. All properties in <stache-code>skyuxconfig.json</stache-code> are optional, and by default, the file only specifies values for the <stache-code>mode</stache-code> and <stache-code>compileMode</stache-code> settings.</p>
<p>SKY UX enables you to create additional configuration files as necessary <a routerLink="/learn/reference/configuration/additional-config-files">to apply settings to specific SKY UX CLI commands</a> using the <stache-code>skyuxconfig.[COMMAND].json</stache-code> naming convention.</p>
<p>The configuration options that are available in the <stache-code>skyuxconfig.json</stache-code> file include:</p>

<ul>
<li>
<p><stache-code>a11y</stache-code> — Enables or disables accessibility test rules. You can manage rules individually, or you can enable or disable all rules in bulk. For examples of how to enable and disable rules, see <a routerLink="/learn/get-started/advanced/accessibility-analyzer">accessibility analyzer</a>.</p>
Expand Down Expand Up @@ -66,6 +66,14 @@
<li>
<p><stache-code>auth</stache-code> — Indicates whether the application requires an authenticated Blackbaud ID. This property is for internal Blackbaud use only. By default, this property is set to <stache-code>false</stache-code>. To require authentication, set this property to <stache-code>true</stache-code>. For Blackbaud developers, <a routerLink="/learn/reference/helpers">the helpers reference</a> provides information about how to make authenticated HTTP requests.</p>
</li>
<li>
<p><stache-code>codeCoverageThreshold</stache-code> — Specifies the minimum code coverage threshold that is required to pass the <stache-code>skyux test</stache-code> command. The available values and their corresponding thresholds are:</p>
<ul>
<li><stache-code>none</stache-code>: 0 percent</li>
<li><stache-code>standard</stache-code>: 80 percent</li>
<li><stache-code>strict</stache-code>: 100 percent</li>
</ul>
</li>
<li>
<p><stache-code>compileMode</stache-code> — Specifies how to compile the project's code. By default, the <stache-code>skyuxconfig.json</stache-code> file sets this property to <stache-code>aot</stache-code> to specify ahead-of-time compilation, which runs the compiler once at build time using one set of libraries. You can change this setting to <stache-code>jit</stache-code> to specify just-in-time compilation, which runs the compiler at run time for every user using a different set of libraries. SKY UX uses ahead-of-time compilation by default because it is typically more performant and has less to handle at run-time. For more information about the difference, see the <a href="https://angular.io/docs/ts/latest/cookbook/aot-compiler.html#!#aot-jit">Angular documentation</a></p>
</li>
Expand Down
2 changes: 1 addition & 1 deletion src/app/learn/reference/tests/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<stache-page-anchor>
Unit tests
</stache-page-anchor>
<p>SKY UX automatically configures <a href="https://karma-runner.github.io">Karma</a> to run unit tests in the <stache-code>src/app</stache-code> folder that match the <stache-code>.spec.ts</stache-code> pattern. We recommend that you follow the <a href="https://angular.io/styleguide#!#naming">Angular naming guidelines</a> on how to name spec files and where to store them. SKY UX unit tests should use the same name as the components or services that they test, but they should end with <stache-code>.spec.ts.</stache-code> And you place the spec files in the same folder as the components or services that they test. When you run <stache-code>skyux test</stache-code> or <stache-code>skyux watch</stache-code>, code coverage results are stored in the <stache-code>coverage</stache-code> folder.</p>
<p>SKY UX automatically configures <a href="https://karma-runner.github.io">Karma</a> to run unit tests in the <stache-code>src/app</stache-code> folder that match the <stache-code>.spec.ts</stache-code> pattern. We recommend that you follow the <a href="https://angular.io/styleguide#!#naming">Angular naming guidelines</a> on how to name spec files and where to store them. SKY UX unit tests should use the same name as the components or services that they test, but they should end with <stache-code>.spec.ts.</stache-code> And you place the spec files in the same folder as the components or services that they test. When you run <stache-code>skyux test</stache-code> or <stache-code>skyux watch</stache-code>, code coverage results are stored in the <stache-code>coverage</stache-code> folder. You can specify a minimum code coverage threshold required to pass the <stache-code>skyux test</stache-code> command using <a routerLink="/learn/reference/configuration">the <stache-code>codeCoverageThreshold</stache-code> configuration option</a>.</p>
<p>When you <a routerLink="/learn/get-started/basics/create-project">create a SKY UX project</a>, the template includes sample unit tests that <a routerLink="/learn/get-started/basics/run-tests">you can run to test the default single-page-application</a>. From the command line, you can use <a routerLink="/learn/reference/cli-commands/test">the <stache-code>skyux test</stache-code> command</a> to run unit tests and <a routerLink="/learn/reference/cli-commands/watch">the <stache-code>skyux watch</stache-code> command</a> to run unit tests and watch the file system for changes.</p>
<p>SKY UX styles are loaded when running unit tests, so CSS rules defined in SKY UX take effect during tests. This allows you to check the expected computed style of an element when using things like the HTML <stache-code>hidden</stache-code> property that only take effect when SKY UX styles are loaded.</p>
<sky-alert alertType="info">For tips and techniques on testing Angular applications, see the <a href="https://angular.io/guide/testing">Angular testing guidelines</a>. And for information about how to test modals in SKY UX, see <a routerLink="/learn/get-started/advanced/unit-test-modals">write unit tests for modals</a>.</sky-alert>
Expand Down