/
validation.spec.ts.snap
172 lines (159 loc) · 5.47 KB
/
validation.spec.ts.snap
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`config/validation validateConfig(config) catches invalid allowedVersions regex 1`] = `
Array [
Object {
"depName": "Configuration Error",
"message": "Invalid regExp for packageRules[1].allowedVersions: \`/***$}{]][/\`",
},
Object {
"depName": "Configuration Error",
"message": "Invalid regExp for packageRules[3].allowedVersions: \`!/***$}{]][/\`",
},
]
`;
exports[`config/validation validateConfig(config) catches invalid templates 1`] = `
Array [
Object {
"depName": "Configuration Error",
"message": "Invalid template in config path: commitMessage",
},
]
`;
exports[`config/validation validateConfig(config) errors for all types 1`] = `
Array [
Object {
"depName": "Configuration Error",
"message": "Configuration option \`enabled\` should be boolean. Found: 1 (number)",
},
Object {
"depName": "Configuration Error",
"message": "Configuration option \`labels\` should be a list (Array)",
},
Object {
"depName": "Configuration Error",
"message": "Configuration option \`lockFileMaintenance\` should be a json object",
},
Object {
"depName": "Configuration Error",
"message": "Configuration option \`packageRules[3].packagePatterns\` should be a list (Array)",
},
Object {
"depName": "Configuration Error",
"message": "Configuration option \`semanticCommitType\` should be a string",
},
Object {
"depName": "Configuration Error",
"message": "Invalid configuration option: packageRules[1].foo",
},
Object {
"depName": "Configuration Error",
"message": "Invalid regExp for packageRules[3].excludePackagePatterns: \`abc ([a-z]+) ([a-z]+))\`",
},
Object {
"depName": "Configuration Error",
"message": "Invalid schedule: \`Invalid schedule: \\"every 15 mins every weekday\\" should not specify minutes\`",
},
Object {
"depName": "Configuration Error",
"message": "extends: Invalid schedule: Unsupported timezone Europe/Brussel",
},
Object {
"depName": "Configuration Error",
"message": "packageRules must contain JSON objects",
},
Object {
"depName": "Configuration Error",
"message": "packageRules: Each packageRule must contain at least one selector (paths, languages, baseBranchList, managers, datasources, depTypeList, packageNames, packagePatterns, excludePackageNames, excludePackagePatterns, sourceUrlPrefixes, updateTypes). If you wish for configuration to apply to all packages, it is not necessary to place it inside a packageRule at all.",
},
Object {
"depName": "Configuration Error",
"message": "timezone: Invalid schedule: Unsupported timezone Asia",
},
]
`;
exports[`config/validation validateConfig(config) errors for unsafe fileMatches 1`] = `
Array [
Object {
"depName": "Configuration Error",
"message": "Invalid regExp for docker.fileMatch: \`x?+\`",
},
Object {
"depName": "Configuration Error",
"message": "Invalid regExp for npm.fileMatch: \`abc ([a-z]+) ([a-z]+))\`",
},
]
`;
exports[`config/validation validateConfig(config) errors if aliases depth is more than 1 1`] = `
Array [
Object {
"depName": "Configuration Error",
"message": "Invalid alias object configuration",
},
]
`;
exports[`config/validation validateConfig(config) errors if aliases have invalid url 1`] = `
Array [
Object {
"depName": "Configuration Error",
"message": "Invalid alias object configuration",
},
]
`;
exports[`config/validation validateConfig(config) errors if regexManager fields are missing 1`] = `
Array [
Object {
"depName": "Configuration Error",
"message": "Regex Managers must contain currentValueTemplate configuration or regex group named currentValue",
},
]
`;
exports[`config/validation validateConfig(config) ignore packageRule nesting validation for presets 1`] = `Array []`;
exports[`config/validation validateConfig(config) included managers of the wrong type 1`] = `
Array [
Object {
"depName": "Configuration Error",
"message": "Configuration option \`packageRules[0].managers\` should be a list (Array)",
},
Object {
"depName": "Configuration Error",
"message": "packageRules: Managers should be type of List. You have included string.",
},
]
`;
exports[`config/validation validateConfig(config) returns deprecation warnings 1`] = `
Array [
Object {
"depName": "Deprecation Warning",
"message": "Direct editing of prTitle is now deprecated. Please edit commitMessage subcomponents instead as they will be passed through to prTitle.",
},
]
`;
exports[`config/validation validateConfig(config) returns nested errors 1`] = `
Array [
Object {
"depName": "Configuration Error",
"message": "Invalid configuration option: foo",
},
Object {
"depName": "Configuration Error",
"message": "Invalid configuration option: lockFileMaintenance.bar",
},
Object {
"depName": "Configuration Error",
"message": "Invalid regExp for packageRules[0].excludePackagePatterns: \`abc ([a-z]+) ([a-z]+))\`",
},
]
`;
exports[`config/validation validateConfig(config) selectors outside packageRules array trigger errors 1`] = `
Array [
Object {
"depName": "Configuration Error",
"message": "docker.minor.packageNames: packageNames should be inside a \`packageRule\` only",
},
Object {
"depName": "Configuration Error",
"message": "packageNames: packageNames should be inside a \`packageRule\` only",
},
]
`;
exports[`config/validation validateConfig(config) validates valid alias objects 1`] = `Array []`;