-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
3 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { Rule, SchematicContext, Tree } from '@angular-devkit/schematics'; | ||
|
||
|
||
// You don't have to export the function as default. You can also have more than one rule factory | ||
// per file. | ||
export function ngAdd(_options: any): Rule { | ||
return (tree: Tree, _context: SchematicContext) => { | ||
return tree; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { Tree } from '@angular-devkit/schematics'; | ||
import { SchematicTestRunner } from '@angular-devkit/schematics/testing'; | ||
import * as path from 'path'; | ||
|
||
|
||
const collectionPath = path.join(__dirname, '../collection.json'); | ||
|
||
|
||
describe('ng-add', () => { | ||
it('works', async () => { | ||
const runner = new SchematicTestRunner('schematics', collectionPath); | ||
const tree = await runner.runSchematicAsync('ng-add', {}, Tree.empty()).toPromise(); | ||
|
||
expect(tree.files).toEqual([]); | ||
}); | ||
}); |