@@ -269,6 +269,28 @@ describe("parseQuery", () => {
269269 show : new Set ( [ ShowMetadataVariant . Due , ShowMetadataVariant . Time ] ) ,
270270 } ) ,
271271 } ,
272+ {
273+ description : "with show including section" ,
274+ input : {
275+ filter : "bar" ,
276+ show : [ "section" ] ,
277+ } ,
278+ expectedOutput : makeQuery ( {
279+ filter : "bar" ,
280+ show : new Set ( [ ShowMetadataVariant . Section ] ) ,
281+ } ) ,
282+ } ,
283+ {
284+ description : "with show including section and project" ,
285+ input : {
286+ filter : "bar" ,
287+ show : [ "section" , "project" ] ,
288+ } ,
289+ expectedOutput : makeQuery ( {
290+ filter : "bar" ,
291+ show : new Set ( [ ShowMetadataVariant . Section , ShowMetadataVariant . Project ] ) ,
292+ } ) ,
293+ } ,
272294 ] ;
273295
274296 for ( const tc of testcases ) {
@@ -319,6 +341,17 @@ describe("parseQuery - warnings", () => {
319341 "Both 'due' and 'time' show options are set. The 'time' option will be ignored when 'due' is present." ,
320342 ] ,
321343 } ,
344+ {
345+ description : "Both project and section in show options" ,
346+ input : {
347+ filter : "bar" ,
348+ show : [ "project" , "section" ] ,
349+ } ,
350+ expectedWarnings : [
351+ "This query is written using JSON. This is deprecated and will be removed in a future version. Please use YAML instead." ,
352+ "Both 'project' and 'section' show options are set. The 'section' option will be ignored when 'project' is present." ,
353+ ] ,
354+ } ,
322355 ] ;
323356
324357 for ( const tc of testcases ) {
0 commit comments