1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.runMigration = exports.callRule = exports.runSchematic = void 0;
|
4 | const path_1 = require("path");
|
5 | const testing_1 = require("@angular-devkit/schematics/testing");
|
6 | const testRunner = new testing_1.SchematicTestRunner('@nrwl/jest', (0, path_1.join)(__dirname, '../../generators.json'));
|
7 | const migrationTestRunner = new testing_1.SchematicTestRunner('@nrwl/jest/migrations', (0, path_1.join)(__dirname, '../../migrations.json'));
|
8 | function runSchematic(schematicName, options, tree) {
|
9 | return testRunner
|
10 | .runSchematicAsync(schematicName, options, tree)
|
11 | .toPromise();
|
12 | }
|
13 | exports.runSchematic = runSchematic;
|
14 | function callRule(rule, tree) {
|
15 | return testRunner.callRule(rule, tree).toPromise();
|
16 | }
|
17 | exports.callRule = callRule;
|
18 | function runMigration(migrationName, options, tree) {
|
19 | return migrationTestRunner
|
20 | .runSchematicAsync(migrationName, options, tree)
|
21 | .toPromise();
|
22 | }
|
23 | exports.runMigration = runMigration;
|
24 |
|
\ | No newline at end of file |