Skip to content

Commit

Permalink
cleanup(angular): set up projects in unit tests to avoid missing .git…
Browse files Browse the repository at this point in the history
…ignore noisy logs (#15691)
  • Loading branch information
leosvelperez authored Mar 15, 2023
1 parent 8f2830c commit 2e88414
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ exports[`StorybookConfiguration generator should generate in the correct folder
Array [
".eslintignore",
".eslintrc.json",
".gitignore",
".prettierignore",
".prettierrc",
"apps/.gitignore",
Expand Down Expand Up @@ -161,6 +162,7 @@ exports[`StorybookConfiguration generator should generate the right files 1`] =
Array [
".eslintignore",
".eslintrc.json",
".gitignore",
".prettierignore",
".prettierrc",
"apps/.gitignore",
Expand Down
5 changes: 5 additions & 0 deletions packages/angular/src/generators/utils/testing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export async function generateTestApplication(
options: ApplicationOptions
): Promise<void> {
addAngularPluginPeerDeps(tree);
tree.write('.gitignore', '');
await applicationGenerator(tree, options);
}

Expand All @@ -26,6 +27,7 @@ export async function generateTestHostApplication(
options: HostOptions
): Promise<void> {
addAngularPluginPeerDeps(tree);
tree.write('.gitignore', '');
await host(tree, options);
}

Expand All @@ -34,6 +36,7 @@ export async function generateTestRemoteApplication(
options: RemoteOptions
): Promise<void> {
addAngularPluginPeerDeps(tree);
tree.write('.gitignore', '');
await remote(tree, options);
}

Expand All @@ -42,6 +45,7 @@ export async function generateTestLibrary(
options: LibraryOptions
): Promise<void> {
addAngularPluginPeerDeps(tree);
tree.write('.gitignore', '');
await libraryGenerator(tree, options);
}

Expand All @@ -50,6 +54,7 @@ export async function createStorybookTestWorkspaceForLib(
): Promise<Tree> {
let tree = createTreeWithEmptyWorkspace({ layout: 'apps-libs' });
addAngularPluginPeerDeps(tree);
tree.write('.gitignore', '');

const { wrapAngularDevkitSchematic } = require('@nrwl/devkit/ngcli-adapter');
const moduleGenerator = wrapAngularDevkitSchematic(
Expand Down

0 comments on commit 2e88414

Please sign in to comment.