UNPKG

ng-tester

Version:

A library containing structured, opinionated Angular testing schematics.

25 lines 1 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const path = require("path"); const schematics_1 = require("@angular-devkit/schematics"); const testing_1 = require("@angular-devkit/schematics/testing"); describe('unit tests', () => { const collectionPath = path.join(__dirname, '../collection.json'); let runner; beforeEach(() => { runner = new testing_1.SchematicTestRunner('schematics', collectionPath); }); it(`doesn't generate spec file, given no "name" param`, done => { runner.runSchematicAsync('unit', {}, schematics_1.Tree.empty()).subscribe(tree => { expect(tree.files).toEqual([]); done(); }); }); it(`does generate spec file, given "name" param`, done => { runner.runSchematicAsync('unit', { name: 'test' }, schematics_1.Tree.empty()).subscribe(tree => { expect(tree.files).toEqual([]); done(); }); }); }); //# sourceMappingURL=index_spec.js.map