All files / utils test-utils.ts

100% Statements 8/8
100% Branches 0/0
100% Functions 1/1
100% Lines 8/8

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2312x 12x   12x     12x   12x       12x             12x 51x    
import * as path from "path";
import {SchematicTestRunner, UnitTestTree} from '@angular-devkit/schematics/testing';
import {Schema as NgNewOptions} from '../ng-new/schema';
import {Style} from "@schematics/angular/ng-new/schema";
import {Observable} from "rxjs";
 
export const NG_VERSION = '9.0.0';
 
export const yangSchematicRunner = new SchematicTestRunner(
  'yang-schematics', path.join(__dirname, '../collection.json')
);
 
export const ngNewOptions: NgNewOptions = {
  name: 'foo',
  directory: '.',
  version: NG_VERSION,
  style: Style.Scss
};
 
export function runYangNew(): Observable<UnitTestTree> {
  return yangSchematicRunner.runSchematicAsync('ng-new', ngNewOptions);
}