ng-test-runner-schematics

0.0.1 • Public • Published

ng-test-runner-schematics

Build Status

About

Schematics for ng-test-runner. It generates Angular Component with spec where ng-test-runner is configured and ready to run.

Installation

ng add ng-test-runner-schematics

Usage

Test for Presentational Component

ng g ng-test-runner-schematics:component my-compoment

Test for Smart Component (that uses http)

ng g ng-test-runner-schematics:component --server my-compoment 

Test with speed hack

It decreases tests execution time by ~40%. For details see https://github.com/angular/angular/issues/12409#issuecomment-383607643 (and full discussion)

ng g ng-test-runner-schematics:component --fast my-compoment 

Options

Option Description
--server=true|false Flag to indicate if a sinon server is added to spec.
Default: false
--fast=true|false Flag to indicate if speed hack should be added to spec.
Default: false
You can also use all Angular CLI component options (they are passed to default CLI schematic). For list of flags check Component documentation.

Package Sidebar

Install

npm i ng-test-runner-schematics

Weekly Downloads

1

Version

0.0.1

License

MIT

Unpacked Size

23.3 kB

Total Files

18

Last publish

Collaborators

  • marmatys