File tree 2 files changed +15
-0
lines changed
2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -209,6 +209,20 @@ describe('util/yaml', () => {
209
209
} ) ;
210
210
} ) ;
211
211
212
+ it ( 'should parse invalid content using strict=false' , ( ) => {
213
+ expect (
214
+ parseSingleYaml ( codeBlock `
215
+ version: '2.1'
216
+
217
+ services:
218
+ rtl_433:
219
+ image: ubuntu:oracular-20240918
220
+ # inserting a space before the hash on the next line makes Renovate work.
221
+ command: "echo some text"# a comment
222
+ ` ) ,
223
+ ) . not . toBeNull ( ) ;
224
+ } ) ;
225
+
212
226
it ( 'should parse content with single document with schema' , ( ) => {
213
227
expect (
214
228
parseSingleYaml (
Original file line number Diff line number Diff line change @@ -158,6 +158,7 @@ function prepareParseOption(options: YamlOptions | undefined): YamlOptions {
158
158
prettyErrors : true ,
159
159
// if we're removing templates, we can run into the situation where we have duplicate keys
160
160
uniqueKeys : ! options ?. removeTemplates ,
161
+ strict : false ,
161
162
...options ,
162
163
} ;
163
164
}
You can’t perform that action at this time.
0 commit comments