@@ -47,6 +47,7 @@ function createTestInitConfigInputs(
4747 {
4848 languagesInput : undefined ,
4949 queriesInput : undefined ,
50+ qualityQueriesInput : undefined ,
5051 packsInput : undefined ,
5152 configFile : undefined ,
5253 dbLocation : undefined ,
@@ -806,6 +807,7 @@ const calculateAugmentationMacro = test.macro({
806807 _title : string ,
807808 rawPacksInput : string | undefined ,
808809 rawQueriesInput : string | undefined ,
810+ rawQualityQueriesInput : string | undefined ,
809811 languages : Language [ ] ,
810812 expectedAugmentationProperties : configUtils . AugmentationProperties ,
811813 ) => {
@@ -815,6 +817,7 @@ const calculateAugmentationMacro = test.macro({
815817 createFeatures ( [ ] ) ,
816818 rawPacksInput ,
817819 rawQueriesInput ,
820+ rawQualityQueriesInput ,
818821 languages ,
819822 mockLogger ,
820823 ) ;
@@ -828,10 +831,12 @@ test(
828831 "All empty" ,
829832 undefined ,
830833 undefined ,
834+ undefined ,
831835 [ Language . javascript ] ,
832836 {
833837 queriesInputCombines : false ,
834838 queriesInput : undefined ,
839+ qualityQueriesInput : undefined ,
835840 packsInputCombines : false ,
836841 packsInput : undefined ,
837842 defaultQueryFilters : [ ] ,
@@ -843,10 +848,12 @@ test(
843848 "With queries" ,
844849 undefined ,
845850 " a, b , c, d" ,
851+ undefined ,
846852 [ Language . javascript ] ,
847853 {
848854 queriesInputCombines : false ,
849855 queriesInput : [ { uses : "a" } , { uses : "b" } , { uses : "c" } , { uses : "d" } ] ,
856+ qualityQueriesInput : undefined ,
850857 packsInputCombines : false ,
851858 packsInput : undefined ,
852859 defaultQueryFilters : [ ] ,
@@ -858,10 +865,34 @@ test(
858865 "With queries combining" ,
859866 undefined ,
860867 " + a, b , c, d " ,
868+ undefined ,
861869 [ Language . javascript ] ,
862870 {
863871 queriesInputCombines : true ,
864872 queriesInput : [ { uses : "a" } , { uses : "b" } , { uses : "c" } , { uses : "d" } ] ,
873+ qualityQueriesInput : undefined ,
874+ packsInputCombines : false ,
875+ packsInput : undefined ,
876+ defaultQueryFilters : [ ] ,
877+ } as configUtils . AugmentationProperties ,
878+ ) ;
879+
880+ test (
881+ calculateAugmentationMacro ,
882+ "With quality queries" ,
883+ undefined ,
884+ undefined ,
885+ " a, b , c, d" ,
886+ [ Language . javascript ] ,
887+ {
888+ queriesInputCombines : false ,
889+ queriesInput : undefined ,
890+ qualityQueriesInput : [
891+ { uses : "a" } ,
892+ { uses : "b" } ,
893+ { uses : "c" } ,
894+ { uses : "d" } ,
895+ ] ,
865896 packsInputCombines : false ,
866897 packsInput : undefined ,
867898 defaultQueryFilters : [ ] ,
@@ -873,10 +904,12 @@ test(
873904 "With packs" ,
874905 " codeql/a , codeql/b , codeql/c , codeql/d " ,
875906 undefined ,
907+ undefined ,
876908 [ Language . javascript ] ,
877909 {
878910 queriesInputCombines : false ,
879911 queriesInput : undefined ,
912+ qualityQueriesInput : undefined ,
880913 packsInputCombines : false ,
881914 packsInput : [ "codeql/a" , "codeql/b" , "codeql/c" , "codeql/d" ] ,
882915 defaultQueryFilters : [ ] ,
@@ -888,10 +921,12 @@ test(
888921 "With packs combining" ,
889922 " + codeql/a, codeql/b, codeql/c, codeql/d" ,
890923 undefined ,
924+ undefined ,
891925 [ Language . javascript ] ,
892926 {
893927 queriesInputCombines : false ,
894928 queriesInput : undefined ,
929+ qualityQueriesInput : undefined ,
895930 packsInputCombines : true ,
896931 packsInput : [ "codeql/a" , "codeql/b" , "codeql/c" , "codeql/d" ] ,
897932 defaultQueryFilters : [ ] ,
@@ -904,6 +939,7 @@ const calculateAugmentationErrorMacro = test.macro({
904939 _title : string ,
905940 rawPacksInput : string | undefined ,
906941 rawQueriesInput : string | undefined ,
942+ rawQualityQueriesInput : string | undefined ,
907943 languages : Language [ ] ,
908944 expectedError : RegExp | string ,
909945 ) => {
@@ -914,6 +950,7 @@ const calculateAugmentationErrorMacro = test.macro({
914950 createFeatures ( [ ] ) ,
915951 rawPacksInput ,
916952 rawQueriesInput ,
953+ rawQualityQueriesInput ,
917954 languages ,
918955 mockLogger ,
919956 ) ,
@@ -928,6 +965,7 @@ test(
928965 "Plus (+) with nothing else (queries)" ,
929966 undefined ,
930967 " + " ,
968+ undefined ,
931969 [ Language . javascript ] ,
932970 / T h e w o r k f l o w p r o p e r t y " q u e r i e s " i s i n v a l i d / ,
933971) ;
@@ -937,6 +975,7 @@ test(
937975 "Plus (+) with nothing else (packs)" ,
938976 " + " ,
939977 undefined ,
978+ undefined ,
940979 [ Language . javascript ] ,
941980 / T h e w o r k f l o w p r o p e r t y " p a c k s " i s i n v a l i d / ,
942981) ;
@@ -946,6 +985,7 @@ test(
946985 "Packs input with multiple languages" ,
947986 " + a/b, c/d " ,
948987 undefined ,
988+ undefined ,
949989 [ Language . javascript , Language . java ] ,
950990 / C a n n o t s p e c i f y a ' p a c k s ' i n p u t i n a m u l t i - l a n g u a g e a n a l y s i s / ,
951991) ;
@@ -955,6 +995,7 @@ test(
955995 "Packs input with no languages" ,
956996 " + a/b, c/d " ,
957997 undefined ,
998+ undefined ,
958999 [ ] ,
9591000 / N o l a n g u a g e s s p e c i f i e d / ,
9601001) ;
@@ -964,6 +1005,7 @@ test(
9641005 "Invalid packs" ,
9651006 " a-pack-without-a-scope " ,
9661007 undefined ,
1008+ undefined ,
9671009 [ Language . javascript ] ,
9681010 / " a - p a c k - w i t h o u t - a - s c o p e " i s n o t a v a l i d p a c k / ,
9691011) ;
0 commit comments