2021-12-20 17:45:52 +01:00
|
|
|
// This test is mostly to check that the parser still kinda outputs something
|
|
|
|
// (and doesn't enter an infinite loop!) even though the query is completely
|
|
|
|
// invalid.
|
2022-01-09 15:12:46 +01:00
|
|
|
const QUERY = ['a b', 'a b', 'a,b(c)'];
|
2021-12-20 17:45:52 +01:00
|
|
|
|
|
|
|
const PARSED = [
|
|
|
|
{
|
|
|
|
args: [],
|
2022-01-09 15:12:46 +01:00
|
|
|
elems: [
|
2021-12-20 17:45:52 +01:00
|
|
|
{
|
2022-01-09 15:12:46 +01:00
|
|
|
name: "a",
|
|
|
|
fullPath: ["a"],
|
2021-12-20 17:45:52 +01:00
|
|
|
pathWithoutLast: [],
|
2022-01-09 15:12:46 +01:00
|
|
|
pathLast: "a",
|
2021-12-20 17:45:52 +01:00
|
|
|
generics: [],
|
|
|
|
},
|
|
|
|
{
|
2022-01-09 15:12:46 +01:00
|
|
|
name: "b",
|
|
|
|
fullPath: ["b"],
|
2021-12-20 17:45:52 +01:00
|
|
|
pathWithoutLast: [],
|
2022-01-09 15:12:46 +01:00
|
|
|
pathLast: "b",
|
2021-12-20 17:45:52 +01:00
|
|
|
generics: [],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
foundElems: 2,
|
2022-01-09 15:12:46 +01:00
|
|
|
original: "a b",
|
2021-12-20 17:45:52 +01:00
|
|
|
returned: [],
|
|
|
|
typeFilter: -1,
|
2022-01-09 15:12:46 +01:00
|
|
|
userQuery: "a b",
|
2021-12-20 17:45:52 +01:00
|
|
|
error: null,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
args: [],
|
|
|
|
elems: [
|
|
|
|
{
|
2022-01-09 15:12:46 +01:00
|
|
|
name: "a",
|
|
|
|
fullPath: ["a"],
|
|
|
|
pathWithoutLast: [],
|
|
|
|
pathLast: "a",
|
|
|
|
generics: [],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "b",
|
|
|
|
fullPath: ["b"],
|
2021-12-20 17:45:52 +01:00
|
|
|
pathWithoutLast: [],
|
2022-01-09 15:12:46 +01:00
|
|
|
pathLast: "b",
|
2021-12-20 17:45:52 +01:00
|
|
|
generics: [],
|
|
|
|
},
|
|
|
|
],
|
2022-01-09 15:12:46 +01:00
|
|
|
foundElems: 2,
|
|
|
|
original: "a b",
|
2021-12-20 17:45:52 +01:00
|
|
|
returned: [],
|
|
|
|
typeFilter: -1,
|
2022-01-09 15:12:46 +01:00
|
|
|
userQuery: "a b",
|
2021-12-20 17:45:52 +01:00
|
|
|
error: null,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
args: [
|
|
|
|
{
|
|
|
|
name: "c",
|
|
|
|
fullPath: ["c"],
|
|
|
|
pathWithoutLast: [],
|
|
|
|
pathLast: "c",
|
|
|
|
generics: [],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
elems: [
|
|
|
|
{
|
|
|
|
name: "a",
|
|
|
|
fullPath: ["a"],
|
|
|
|
pathWithoutLast: [],
|
|
|
|
pathLast: "a",
|
|
|
|
generics: [],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "b",
|
|
|
|
fullPath: ["b"],
|
|
|
|
pathWithoutLast: [],
|
|
|
|
pathLast: "b",
|
|
|
|
generics: [],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
foundElems: 3,
|
|
|
|
original: "a,b(c)",
|
|
|
|
returned: [],
|
|
|
|
typeFilter: -1,
|
2022-01-03 16:43:30 +01:00
|
|
|
userQuery: "a,b(c)",
|
2021-12-20 17:45:52 +01:00
|
|
|
error: null,
|
|
|
|
},
|
|
|
|
];
|