@@ -10,10 +10,13 @@ import * as utils from '@nx-dotnet/utils';
1010
1111import update from './remove-output-option' ;
1212
13+ const projects = new Map ( ) ;
14+
1315jest . mock ( '@nx-dotnet/utils' , ( ) => ( {
1416 ...( jest . requireActual ( '@nx-dotnet/utils' ) as typeof utils ) ,
1517 getProjectFileForNxProject : ( ) =>
1618 Promise . resolve ( 'apps/my-app/my-app.csproj' ) ,
19+ getNxDotnetProjects : ( ) => projects ,
1720} ) ) ;
1821
1922describe ( 'remove-output-option' , ( ) => {
@@ -33,6 +36,18 @@ describe('remove-output-option', () => {
3336 </Root>` ,
3437 ) ;
3538
39+ projects . clear ( ) ;
40+ projects . set ( 'my-app' , {
41+ root : 'apps/my-app' ,
42+ targets : {
43+ build : {
44+ executor : '@nx-dotnet/core:build' ,
45+ options : {
46+ output : 'dist/apps/my-app' ,
47+ } ,
48+ } ,
49+ } ,
50+ } ) ;
3651 addProjectConfiguration ( tree , 'my-app' , {
3752 root : 'apps/my-app' ,
3853 targets : {
@@ -63,6 +78,19 @@ describe('remove-output-option', () => {
6378 </Root>` ,
6479 ) ;
6580
81+ projects . clear ( ) ;
82+ projects . set ( 'my-app' , {
83+ root : 'apps/my-app' ,
84+ targets : {
85+ build : {
86+ executor : '@nx-dotnet/core:build' ,
87+ outputs : [ '{options.output}' ] ,
88+ options : {
89+ output : 'dist/apps/my-app' ,
90+ } ,
91+ } ,
92+ } ,
93+ } ) ;
6694 addProjectConfiguration ( tree , 'my-app' , {
6795 root : 'apps/my-app' ,
6896 targets : {
@@ -96,6 +124,18 @@ describe('remove-output-option', () => {
96124 </Root>` ,
97125 ) ;
98126
127+ projects . clear ( ) ;
128+ projects . set ( 'my-app' , {
129+ root : 'apps/my-app' ,
130+ targets : {
131+ build : {
132+ executor : '@nx-dotnet/core:build' ,
133+ options : {
134+ output : 'dist/apps/my-app' ,
135+ } ,
136+ } ,
137+ } ,
138+ } ) ;
99139 addProjectConfiguration ( tree , 'my-app' , {
100140 root : 'apps/my-app' ,
101141 targets : {
0 commit comments