-
-
Notifications
You must be signed in to change notification settings - Fork 92
Expand file tree
/
Copy pathparser.test.ts.snap
More file actions
104 lines (85 loc) · 5.92 KB
/
parser.test.ts.snap
File metadata and controls
104 lines (85 loc) · 5.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`parseQuery - error message snapshots > array with mixed valid and invalid enum values 1`] = `
[Error: Field 'sorting' elements have the following issues:
Item 'sorting[1]': Invalid option: expected one of "priority"|"priorityAscending"|"priorityDescending"|"date"|"dateAscending"|"dateDescending"|"order"|"dateAdded"|"dateAddedAscending"|"dateAddedDescending"|"alphabetical"|"alphabeticalAscending"|"alphabeticalDescending"]
`;
exports[`parseQuery - error message snapshots > autorefresh must be a number 1`] = `
[Error: Field 'autorefresh' has the following issues:
Invalid input: expected number, received string]
`;
exports[`parseQuery - error message snapshots > autorefresh must be non-negative 1`] = `
[Error: Field 'autorefresh' has the following issues:
Too small: expected number to be >=0]
`;
exports[`parseQuery - error message snapshots > filter must be a string 1`] = `
[Error: Field 'filter' has the following issues:
Invalid input: expected string, received number]
`;
exports[`parseQuery - error message snapshots > groupBy must be a string 1`] = `
[Error: Field 'groupBy' has the following issues:
Invalid option: expected one of "project"|"section"|"priority"|"due"|"date"|"labels"]
`;
exports[`parseQuery - error message snapshots > groupBy must have valid enum value 1`] = `
[Error: Field 'groupBy' has the following issues:
Invalid option: expected one of "project"|"section"|"priority"|"due"|"date"|"labels"]
`;
exports[`parseQuery - error message snapshots > invalid JSON - missing quotes 1`] = `
[Error: Field 'filter' has the following issues:
Invalid input: expected string, received undefined]
`;
exports[`parseQuery - error message snapshots > invalid JSON - unclosed brace 1`] = `[Error: Unable to parse as YAML or JSON]`;
exports[`parseQuery - error message snapshots > invalid YAML - incorrect indentation 1`] = `[Error: Unable to parse as YAML or JSON]`;
exports[`parseQuery - error message snapshots > missing required filter field 1`] = `
[Error: Field 'filter' has the following issues:
Invalid input: expected string, received undefined]
`;
exports[`parseQuery - error message snapshots > multiple validation errors 1`] = `
[Error: Field 'name' has the following issues:
Invalid input: expected string, received number
Field 'filter' has the following issues:
Invalid input: expected string, received undefined
Field 'autorefresh' has the following issues:
Too small: expected number to be >=0
Field 'sorting' has the following issues:
Invalid input: expected array, received string]
`;
exports[`parseQuery - error message snapshots > name must be a string 1`] = `
[Error: Field 'name' has the following issues:
Invalid input: expected string, received number]
`;
exports[`parseQuery - error message snapshots > neither valid JSON nor YAML 1`] = `[Error: Invalid input: expected object, received string]`;
exports[`parseQuery - error message snapshots > show array must contain strings 1`] = `
[Error: Field 'show' has the following issues:
Invalid input: expected "none"
Field 'show' elements have the following issues:
Item 'show[0]': Invalid option: expected one of "due"|"date"|"description"|"labels"|"project"|"deadline"|"time"
Item 'show[1]': Invalid option: expected one of "due"|"date"|"description"|"labels"|"project"|"deadline"|"time"
Item 'show[2]': Invalid option: expected one of "due"|"date"|"description"|"labels"|"project"|"deadline"|"time"]
`;
exports[`parseQuery - error message snapshots > show field - invalid literal (not 'none') 1`] = `
[Error: Field 'show' has the following issues:
Invalid input: expected array, received string
Invalid input: expected "none"]
`;
exports[`parseQuery - error message snapshots > show must have valid enum values 1`] = `
[Error: Field 'show' has the following issues:
Invalid input: expected "none"
Field 'show' elements have the following issues:
Item 'show[0]': Invalid option: expected one of "due"|"date"|"description"|"labels"|"project"|"deadline"|"time"
Item 'show[1]': Invalid option: expected one of "due"|"date"|"description"|"labels"|"project"|"deadline"|"time"]
`;
exports[`parseQuery - error message snapshots > sorting array must contain strings 1`] = `
[Error: Field 'sorting' elements have the following issues:
Item 'sorting[0]': Invalid option: expected one of "priority"|"priorityAscending"|"priorityDescending"|"date"|"dateAscending"|"dateDescending"|"order"|"dateAdded"|"dateAddedAscending"|"dateAddedDescending"|"alphabetical"|"alphabeticalAscending"|"alphabeticalDescending"
Item 'sorting[1]': Invalid option: expected one of "priority"|"priorityAscending"|"priorityDescending"|"date"|"dateAscending"|"dateDescending"|"order"|"dateAdded"|"dateAddedAscending"|"dateAddedDescending"|"alphabetical"|"alphabeticalAscending"|"alphabeticalDescending"
Item 'sorting[2]': Invalid option: expected one of "priority"|"priorityAscending"|"priorityDescending"|"date"|"dateAscending"|"dateDescending"|"order"|"dateAdded"|"dateAddedAscending"|"dateAddedDescending"|"alphabetical"|"alphabeticalAscending"|"alphabeticalDescending"]
`;
exports[`parseQuery - error message snapshots > sorting must be an array 1`] = `
[Error: Field 'sorting' has the following issues:
Invalid input: expected array, received string]
`;
exports[`parseQuery - error message snapshots > sorting must have valid enum values 1`] = `
[Error: Field 'sorting' elements have the following issues:
Item 'sorting[0]': Invalid option: expected one of "priority"|"priorityAscending"|"priorityDescending"|"date"|"dateAscending"|"dateDescending"|"order"|"dateAdded"|"dateAddedAscending"|"dateAddedDescending"|"alphabetical"|"alphabeticalAscending"|"alphabeticalDescending"
Item 'sorting[1]': Invalid option: expected one of "priority"|"priorityAscending"|"priorityDescending"|"date"|"dateAscending"|"dateDescending"|"order"|"dateAdded"|"dateAddedAscending"|"dateAddedDescending"|"alphabetical"|"alphabeticalAscending"|"alphabeticalDescending"]
`;