UNPKG

535 BPlain TextView Raw
1import { Tree } from '@angular-devkit/schematics';
2import { SchematicTestRunner } from '@angular-devkit/schematics/testing';
3import * as path from 'path';
4
5const collectionPath = path.join(__dirname, '../collection.json');
6
7describe('<%= dasherize(name) %>', () => {
8 it('works', async () => {
9 const runner = new SchematicTestRunner('schematics', collectionPath);
10 const tree = await runner
11 .runSchematicAsync('<%= dasherize(name) %>', {}, Tree.empty())
12 .toPromise();
13
14 expect(tree.files).toEqual([]);
15 });
16});