@@ -143,48 +143,39 @@ describe('ProblemDiagnosticActionResolver', () => {
143143
144144 describe ( 'run-generator action' , ( ) => {
145145
146- it ( 'encodes generator and context in the command URI arguments (CubeMX2 example)' , ( ) => {
146+ it ( 'encodes generator and context in the command URI arguments (CubeMX example)' , ( ) => {
147147 const { command, args } = decodeCodeTarget ( resolver , makeContext ( {
148- message : "run generator 'CubeMX2 ' for context 'CubeMX2 .Debug+STM32C531CBT6'" ,
148+ message : "cgen file was not found, run generator 'CubeMX ' for context 'CubeMX .Debug+STM32C531CBT6'" ,
149149 } ) ) ;
150150
151151 expect ( command ) . toBe ( `command:${ RUN_GENERATOR_COMMAND_ID } ` ) ;
152- expect ( args ) . toEqual ( [ { generator : 'CubeMX2' , context : 'CubeMX2.Debug+STM32C531CBT6' } ] ) ;
153- } ) ;
154-
155- it ( 'encodes generator and context in the command URI arguments (legacy CubeMX example)' , ( ) => {
156- const { command, args } = decodeCodeTarget ( resolver , makeContext ( {
157- message : "cgen file was not found, run generator 'CubeMX' for context 'App.Debug+STM32'" ,
158- } ) ) ;
159-
160- expect ( command ) . toBe ( `command:${ RUN_GENERATOR_COMMAND_ID } ` ) ;
161- expect ( args ) . toEqual ( [ { generator : 'CubeMX' , context : 'App.Debug+STM32' } ] ) ;
152+ expect ( args ) . toEqual ( [ { generator : 'CubeMX' , context : 'CubeMX.Debug+STM32C531CBT6' } ] ) ;
162153 } ) ;
163154
164155 it ( 'returns a formatted message and a code' , ( ) => {
165156 const result = resolver . resolve ( makeContext ( {
166- message : "cgen file was not found, run generator 'CubeMX' for context 'App .Debug+STM32'" ,
157+ message : "cgen file was not found, run generator 'CubeMX' for context 'MyProject .Debug+STM32'" ,
167158 } ) ) ;
168159
169- expect ( result ?. message ) . toBe ( "Run generator 'CubeMX' for project 'App .Debug+STM32'" ) ;
160+ expect ( result ?. message ) . toBe ( "Run generator 'CubeMX' for project 'MyProject .Debug+STM32'" ) ;
170161 expect ( result ?. code ) . toBeDefined ( ) ;
171162 } ) ;
172163
173164 it ( 'matches alternate wording with trailing context description' , ( ) => {
174165 const result = resolver . resolve ( makeContext ( {
175- message : "run generator 'CubeMX2 ' for context 'CubeMX2 .Debug+STM32C531CBT6' to generate missing cgen artifacts" ,
166+ message : "run generator 'CubeMX ' for context 'CubeMX .Debug+STM32C531CBT6' to generate missing cgen artifacts" ,
176167 } ) ) ;
177168
178169 expect ( ( result ?. code as { value : string } | undefined ) ?. value ) . toBe ( 'Run Generator' ) ;
179170 } ) ;
180171
181172 it ( 'matches generator messages with irregular whitespace' , ( ) => {
182173 const { command, args } = decodeCodeTarget ( resolver , makeContext ( {
183- message : "cgen file was not found,\n run generator 'CubeMX'\nfor context 'App .Debug+STM32'" ,
174+ message : "cgen file was not found,\n run generator 'CubeMX'\nfor context 'MyProject .Debug+STM32'" ,
184175 } ) ) ;
185176
186177 expect ( command ) . toBe ( `command:${ RUN_GENERATOR_COMMAND_ID } ` ) ;
187- expect ( args ) . toEqual ( [ { generator : 'CubeMX' , context : 'App .Debug+STM32' } ] ) ;
178+ expect ( args ) . toEqual ( [ { generator : 'CubeMX' , context : 'MyProject .Debug+STM32' } ] ) ;
188179 } ) ;
189180 } ) ;
190181
0 commit comments