1
Fork 0

* If type filter is in quotes, throw an error.

* If there are generics, don't allow to have quotes.
This commit is contained in:
Guillaume Gomez 2022-01-03 23:51:20 +01:00
parent bbcf1762dd
commit 51de26cfd9
5 changed files with 45 additions and 58 deletions

View file

@ -1,4 +1,4 @@
const QUERY = ['<"P">', '"P" "P"', 'P "P"'];
const QUERY = ['<"P">', '"P" "P"', 'P "P"', '"p" p', '"const": p'];
const PARSED = [
{
@ -40,4 +40,30 @@ const PARSED = [
userQuery: "p \"p\"",
error: "Cannot use literal search when there is more than one element",
},
{
args: [],
elemName: null,
elems: [],
foundElems: 0,
id: "\"p\" p",
nameSplit: null,
original: "\"p\" p",
returned: [],
typeFilter: null,
userQuery: "\"p\" p",
error: "You cannot have more than one element if you use quotes",
},
{
args: [],
elemName: null,
elems: [],
foundElems: 0,
id: "\"const\": p",
nameSplit: null,
original: "\"const\": p",
returned: [],
typeFilter: null,
userQuery: "\"const\": p",
error: "You cannot use quotes on type filter",
},
];