Function: overrideCollectionResolutionForTesting
▸ overrideCollectionResolutionForTesting(collections
): void
By default, Angular Devkit schematic collections will be resolved using the Node resolution. This doesn't work if you are testing schematics that refer to other schematics in the same repo.
This function can can be used to override the resolution behaviour.
Example:
1overrideCollectionResolutionForTesting({
2 '@nx/workspace': path.join(
3 __dirname,
4 '../../../../workspace/generators.json'
5 ),
6 '@nx/angular': path.join(__dirname, '../../../../angular/generators.json'),
7 '@nx/linter': path.join(__dirname, '../../../../linter/generators.json'),
8});
9
Parameters
Name | Type |
---|---|
collections | Object |
Returns
void