@@ -96,21 +96,6 @@ describe('nx-plugin g configuration', () => {
9696 'NX Generating @code-pushup/nx-plugin:configuration' ,
9797 ) ;
9898 expect ( cleanedStdout ) . not . toMatch ( / ^ C R E A T E .* c o d e - p u s h u p .c o n f i g .t s / m) ;
99- expect ( cleanedStdout ) . toMatch ( / ^ U P D A T E .* p r o j e c t .j s o n / m) ;
100-
101- const projectJson = await readFile (
102- path . join ( cwd , 'libs' , project , 'project.json' ) ,
103- 'utf8' ,
104- ) ;
105- expect ( JSON . parse ( projectJson ) ) . toStrictEqual (
106- expect . objectContaining ( {
107- targets : expect . objectContaining ( {
108- 'code-pushup' : {
109- executor : '@code-pushup/nx-plugin:cli' ,
110- } ,
111- } ) ,
112- } ) ,
113- ) ;
11499 } ) ;
115100
116101 it ( 'should NOT create a code-pushup.config.ts file if skipConfig is given' , async ( ) => {
@@ -137,21 +122,6 @@ describe('nx-plugin g configuration', () => {
137122 'NX Generating @code-pushup/nx-plugin:configuration' ,
138123 ) ;
139124 expect ( cleanedStdout ) . not . toMatch ( / ^ C R E A T E .* c o d e - p u s h u p .c o n f i g .t s / m) ;
140- expect ( cleanedStdout ) . toMatch ( / ^ U P D A T E .* p r o j e c t .j s o n / m) ;
141-
142- const projectJson = await readFile (
143- path . join ( cwd , 'libs' , project , 'project.json' ) ,
144- 'utf8' ,
145- ) ;
146- expect ( JSON . parse ( projectJson ) ) . toStrictEqual (
147- expect . objectContaining ( {
148- targets : expect . objectContaining ( {
149- 'code-pushup' : {
150- executor : '@code-pushup/nx-plugin:cli' ,
151- } ,
152- } ) ,
153- } ) ,
154- ) ;
155125
156126 await expect (
157127 readFile (
@@ -161,53 +131,6 @@ describe('nx-plugin g configuration', () => {
161131 ) . rejects . toThrow ( 'no such file or directory' ) ;
162132 } ) ;
163133
164- it ( 'should NOT add target to project.json if skipTarget is given' , async ( ) => {
165- const cwd = path . join ( testFileDir , 'configure-skip-target' ) ;
166- await materializeTree ( tree , cwd ) ;
167-
168- const { code, stdout } = await executeProcess ( {
169- command : 'npx' ,
170- args : [
171- 'nx' ,
172- 'g' ,
173- '@code-pushup/nx-plugin:configuration' ,
174- project ,
175- '--skipTarget' ,
176- ] ,
177- cwd,
178- } ) ;
179- expect ( code ) . toBe ( 0 ) ;
180-
181- const cleanedStdout = removeColorCodes ( stdout ) ;
182-
183- expect ( cleanedStdout ) . toContain (
184- 'NX Generating @code-pushup/nx-plugin:configuration' ,
185- ) ;
186- expect ( cleanedStdout ) . toMatch ( / ^ C R E A T E .* c o d e - p u s h u p .c o n f i g .t s / m) ;
187- expect ( cleanedStdout ) . not . toMatch ( / ^ U P D A T E .* p r o j e c t .j s o n / m) ;
188-
189- const projectJson = await readFile (
190- path . join ( cwd , 'libs' , project , 'project.json' ) ,
191- 'utf8' ,
192- ) ;
193- expect ( JSON . parse ( projectJson ) ) . toStrictEqual (
194- expect . objectContaining ( {
195- targets : expect . not . objectContaining ( {
196- 'code-pushup' : {
197- executor : '@code-pushup/nx-plugin:cli' ,
198- } ,
199- } ) ,
200- } ) ,
201- ) ;
202-
203- await expect (
204- readFile (
205- path . join ( cwd , 'libs' , project , 'code-pushup.config.ts' ) ,
206- 'utf8' ,
207- ) ,
208- ) . resolves . toStrictEqual ( expect . any ( String ) ) ;
209- } ) ;
210-
211134 it ( 'should inform about dry run' , async ( ) => {
212135 const cwd = path . join ( testFileDir , 'configure' ) ;
213136 await materializeTree ( tree , cwd ) ;
0 commit comments