@@ -894,51 +894,6 @@ apiDescribe('Validation:', (persistence: boolean) => {
894
894
}
895
895
) ;
896
896
897
- validationIt ( persistence , 'with multiple array filters fail' , db => {
898
- expect ( ( ) =>
899
- query (
900
- collection ( db , 'test' ) ,
901
- where ( 'foo' , 'array-contains' , 1 ) ,
902
- where ( 'foo' , 'array-contains' , 2 )
903
- )
904
- ) . to . throw (
905
- "Invalid query. You cannot use more than one 'array-contains' filter."
906
- ) ;
907
-
908
- expect ( ( ) =>
909
- query (
910
- collection ( db , 'test' ) ,
911
- where ( 'foo' , 'array-contains' , 1 ) ,
912
- where ( 'foo' , 'array-contains-any' , [ 2 , 3 ] )
913
- )
914
- ) . to . throw (
915
- "Invalid query. You cannot use 'array-contains-any' filters with " +
916
- "'array-contains' filters."
917
- ) ;
918
-
919
- expect ( ( ) =>
920
- query (
921
- collection ( db , 'test' ) ,
922
- where ( 'foo' , 'array-contains-any' , [ 2 , 3 ] ) ,
923
- where ( 'foo' , 'array-contains' , 1 )
924
- )
925
- ) . to . throw (
926
- "Invalid query. You cannot use 'array-contains' filters with " +
927
- "'array-contains-any' filters."
928
- ) ;
929
-
930
- expect ( ( ) =>
931
- query (
932
- collection ( db , 'test' ) ,
933
- where ( 'foo' , 'not-in' , [ 2 , 3 ] ) ,
934
- where ( 'foo' , 'array-contains' , 1 )
935
- )
936
- ) . to . throw (
937
- "Invalid query. You cannot use 'array-contains' filters with " +
938
- "'not-in' filters."
939
- ) ;
940
- } ) ;
941
-
942
897
validationIt ( persistence , 'with != and not-in filters fail' , db => {
943
898
expect ( ( ) =>
944
899
query (
@@ -972,17 +927,6 @@ apiDescribe('Validation:', (persistence: boolean) => {
972
927
"Invalid query. You cannot use more than one 'not-in' filter."
973
928
) ;
974
929
975
- expect ( ( ) =>
976
- query (
977
- collection ( db , 'test' ) ,
978
- where ( 'foo' , 'array-contains-any' , [ 1 , 2 ] ) ,
979
- where ( 'foo' , 'array-contains-any' , [ 2 , 3 ] )
980
- )
981
- ) . to . throw (
982
- "Invalid query. You cannot use more than one 'array-contains-any'" +
983
- ' filter.'
984
- ) ;
985
-
986
930
expect ( ( ) =>
987
931
query (
988
932
collection ( db , 'test' ) ,
@@ -1024,55 +968,6 @@ apiDescribe('Validation:', (persistence: boolean) => {
1024
968
) . to . throw (
1025
969
"Invalid query. You cannot use 'not-in' filters with 'in' filters."
1026
970
) ;
1027
-
1028
- // This is redundant with the above tests, but makes sure our validation
1029
- // doesn't get confused.
1030
- expect ( ( ) =>
1031
- query (
1032
- collection ( db , 'test' ) ,
1033
- where ( 'foo' , 'in' , [ 2 , 3 ] ) ,
1034
- where ( 'foo' , 'array-contains' , 1 ) ,
1035
- where ( 'foo' , 'array-contains-any' , [ 2 ] )
1036
- )
1037
- ) . to . throw (
1038
- "Invalid query. You cannot use 'array-contains-any' filters with 'array-contains' filters."
1039
- ) ;
1040
-
1041
- expect ( ( ) =>
1042
- query (
1043
- collection ( db , 'test' ) ,
1044
- where ( 'foo' , 'array-contains' , 1 ) ,
1045
- where ( 'foo' , 'in' , [ 2 , 3 ] ) ,
1046
- where ( 'foo' , 'array-contains-any' , [ 2 ] )
1047
- )
1048
- ) . to . throw (
1049
- "Invalid query. You cannot use 'array-contains-any' filters with " +
1050
- "'array-contains' filters."
1051
- ) ;
1052
-
1053
- expect ( ( ) =>
1054
- query (
1055
- collection ( db , 'test' ) ,
1056
- where ( 'foo' , 'not-in' , [ 2 , 3 ] ) ,
1057
- where ( 'foo' , 'array-contains' , 2 ) ,
1058
- where ( 'foo' , 'array-contains-any' , [ 2 ] )
1059
- )
1060
- ) . to . throw (
1061
- "Invalid query. You cannot use 'array-contains' filters with " +
1062
- "'not-in' filters."
1063
- ) ;
1064
-
1065
- expect ( ( ) =>
1066
- query (
1067
- collection ( db , 'test' ) ,
1068
- where ( 'foo' , 'array-contains' , 2 ) ,
1069
- where ( 'foo' , 'in' , [ 2 ] ) ,
1070
- where ( 'foo' , 'not-in' , [ 2 , 3 ] )
1071
- )
1072
- ) . to . throw (
1073
- "Invalid query. You cannot use 'not-in' filters with " +
1074
- "'array-contains' filters."
1075
- ) ;
1076
971
} ) ;
1077
972
1078
973
validationIt (
@@ -1094,17 +989,6 @@ apiDescribe('Validation:', (persistence: boolean) => {
1094
989
where ( 'foo' , 'array-contains' , 1 )
1095
990
)
1096
991
) . not . to . throw ( ) ;
1097
-
1098
- expect ( ( ) =>
1099
- query (
1100
- collection ( db , 'test' ) ,
1101
- where ( 'foo' , 'in' , [ 2 , 3 ] ) ,
1102
- where ( 'foo' , 'array-contains' , 1 ) ,
1103
- where ( 'foo' , 'array-contains' , 2 )
1104
- )
1105
- ) . to . throw (
1106
- "Invalid query. You cannot use more than one 'array-contains' filter."
1107
- ) ;
1108
992
}
1109
993
) ;
1110
994
@@ -1125,31 +1009,6 @@ apiDescribe('Validation:', (persistence: boolean) => {
1125
1009
"'array-contains-any' filters."
1126
1010
) ;
1127
1011
1128
- expect ( ( ) =>
1129
- query (
1130
- collection ( db , 'test' ) ,
1131
- // The 10 element max includes duplicates.
1132
- where ( 'foo' , 'in' , [ 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 9 , 9 ] )
1133
- )
1134
- ) . to . throw (
1135
- "Invalid Query. 'in' filters support a maximum of 10 elements in " +
1136
- 'the value array.'
1137
- ) ;
1138
-
1139
- expect ( ( ) =>
1140
- query (
1141
- collection ( db , 'test' ) ,
1142
- where (
1143
- 'foo' ,
1144
- 'array-contains-any' ,
1145
- [ 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 9 , 9 ]
1146
- )
1147
- )
1148
- ) . to . throw (
1149
- "Invalid Query. 'array-contains-any' filters support a maximum of " +
1150
- '10 elements in the value array.'
1151
- ) ;
1152
-
1153
1012
expect ( ( ) =>
1154
1013
query ( collection ( db , 'test' ) , where ( 'foo' , 'in' , [ ] ) )
1155
1014
) . to . throw (
0 commit comments