|
1 | 1 | // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html |
2 | 2 |
|
3 | 3 | exports[`bundle > should throw on additional property in bundle 1`] = ` |
4 | | -"Validation of Edge Functions manifest failed |
| 4 | +[ManifestValidationError: Validation of Edge Functions manifest failed |
5 | 5 | ADDTIONAL PROPERTY must NOT have additional properties |
6 | 6 |
|
7 | | - 4 | \\"asset\\": \\"f35baff44129a8f6be7db68590b2efd86ed4ba29000e2edbcaddc5d620d7d043.js\\", |
8 | | - 5 | \\"format\\": \\"js\\", |
9 | | -> 6 | \\"foo\\": \\"bar\\" |
| 7 | + 4 | "asset": "f35baff44129a8f6be7db68590b2efd86ed4ba29000e2edbcaddc5d620d7d043.js", |
| 8 | + 5 | "format": "js", |
| 9 | +> 6 | "foo": "bar" |
10 | 10 | | ^^^^^ 😲 foo is not expected to be here! |
11 | 11 | 7 | } |
12 | 12 | 8 | ], |
13 | | - 9 | \\"routes\\": [" |
| 13 | + 9 | "routes": [] |
14 | 14 | `; |
15 | 15 |
|
16 | 16 | exports[`bundle > should throw on invalid format 1`] = ` |
17 | | -"Validation of Edge Functions manifest failed |
| 17 | +[ManifestValidationError: Validation of Edge Functions manifest failed |
18 | 18 | ENUM must be equal to one of the allowed values |
19 | 19 | (eszip2, js) |
20 | 20 |
|
21 | 21 | 3 | { |
22 | | - 4 | \\"asset\\": \\"f35baff44129a8f6be7db68590b2efd86ed4ba29000e2edbcaddc5d620d7d043.js\\", |
23 | | -> 5 | \\"format\\": \\"foo\\" |
| 22 | + 4 | "asset": "f35baff44129a8f6be7db68590b2efd86ed4ba29000e2edbcaddc5d620d7d043.js", |
| 23 | +> 5 | "format": "foo" |
24 | 24 | | ^^^^^ 👈🏽 Unexpected value, should be equal to one of the allowed values |
25 | 25 | 6 | } |
26 | 26 | 7 | ], |
27 | | - 8 | \\"routes\\": [" |
| 27 | + 8 | "routes": [] |
28 | 28 | `; |
29 | 29 |
|
30 | 30 | exports[`bundle > should throw on missing asset 1`] = ` |
31 | | -"Validation of Edge Functions manifest failed |
| 31 | +[ManifestValidationError: Validation of Edge Functions manifest failed |
32 | 32 | REQUIRED must have required property 'asset' |
33 | 33 |
|
34 | 34 | 1 | { |
35 | | - 2 | \\"bundles\\": [ |
| 35 | + 2 | "bundles": [ |
36 | 36 | > 3 | { |
37 | 37 | | ^ ☹️ asset is missing here! |
38 | | - 4 | \\"format\\": \\"js\\" |
| 38 | + 4 | "format": "js" |
39 | 39 | 5 | } |
40 | | - 6 | ]," |
| 40 | + 6 | ],] |
41 | 41 | `; |
42 | 42 |
|
43 | 43 | exports[`bundle > should throw on missing format 1`] = ` |
44 | | -"Validation of Edge Functions manifest failed |
| 44 | +[ManifestValidationError: Validation of Edge Functions manifest failed |
45 | 45 | REQUIRED must have required property 'format' |
46 | 46 |
|
47 | 47 | 1 | { |
48 | | - 2 | \\"bundles\\": [ |
| 48 | + 2 | "bundles": [ |
49 | 49 | > 3 | { |
50 | 50 | | ^ ☹️ format is missing here! |
51 | | - 4 | \\"asset\\": \\"f35baff44129a8f6be7db68590b2efd86ed4ba29000e2edbcaddc5d620d7d043.js\\" |
| 51 | + 4 | "asset": "f35baff44129a8f6be7db68590b2efd86ed4ba29000e2edbcaddc5d620d7d043.js" |
52 | 52 | 5 | } |
53 | | - 6 | ]," |
| 53 | + 6 | ],] |
54 | 54 | `; |
55 | 55 |
|
56 | 56 | exports[`import map URL > should throw on wrong type 1`] = ` |
57 | | -"Validation of Edge Functions manifest failed |
| 57 | +[ManifestValidationError: Validation of Edge Functions manifest failed |
58 | 58 | TYPE must be string |
59 | 59 |
|
60 | 60 | 30 | ], |
61 | | - 31 | \\"bundler_version\\": \\"1.6.0\\", |
62 | | -> 32 | \\"import_map\\": [ |
| 61 | + 31 | "bundler_version": "1.6.0", |
| 62 | +> 32 | "import_map": [ |
63 | 63 | | ^ |
64 | | -> 33 | \\"file:///root/.netlify/edge-functions-dist/import_map.json\\" |
| 64 | +> 33 | "file:///root/.netlify/edge-functions-dist/import_map.json" |
65 | 65 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
66 | 66 | > 34 | ] |
67 | 67 | | ^^^^ 👈🏽 type must be string |
68 | | - 35 | }" |
| 68 | + 35 | }] |
69 | 69 | `; |
70 | 70 |
|
71 | 71 | exports[`layers > should throw on additional property 1`] = ` |
72 | | -"Validation of Edge Functions manifest failed |
| 72 | +[ManifestValidationError: Validation of Edge Functions manifest failed |
73 | 73 | ADDTIONAL PROPERTY must NOT have additional properties |
74 | 74 |
|
75 | | - 27 | \\"name\\": \\"name\\", |
76 | | - 28 | \\"local\\": \\"local\\", |
77 | | -> 29 | \\"foo\\": \\"bar\\" |
| 75 | + 27 | "name": "name", |
| 76 | + 28 | "local": "local", |
| 77 | +> 29 | "foo": "bar" |
78 | 78 | | ^^^^^ 😲 foo is not expected to be here! |
79 | 79 | 30 | } |
80 | 80 | 31 | ], |
81 | | - 32 | \\"bundler_version\\": \\"1.6.0\\"" |
| 81 | + 32 | "bundler_version": "1.6.0"] |
82 | 82 | `; |
83 | 83 |
|
84 | 84 | exports[`layers > should throw on missing flag 1`] = ` |
85 | | -"Validation of Edge Functions manifest failed |
| 85 | +[ManifestValidationError: Validation of Edge Functions manifest failed |
86 | 86 | REQUIRED must have required property 'flag' |
87 | 87 |
|
88 | 88 | 23 | ], |
89 | | - 24 | \\"layers\\": [ |
| 89 | + 24 | "layers": [ |
90 | 90 | > 25 | { |
91 | 91 | | ^ ☹️ flag is missing here! |
92 | | - 26 | \\"name\\": \\"name\\", |
93 | | - 27 | \\"local\\": \\"local\\" |
94 | | - 28 | }" |
| 92 | + 26 | "name": "name", |
| 93 | + 27 | "local": "local" |
| 94 | + 28 | }] |
95 | 95 | `; |
96 | 96 |
|
97 | 97 | exports[`layers > should throw on missing name 1`] = ` |
98 | | -"Validation of Edge Functions manifest failed |
| 98 | +[ManifestValidationError: Validation of Edge Functions manifest failed |
99 | 99 | REQUIRED must have required property 'name' |
100 | 100 |
|
101 | 101 | 23 | ], |
102 | | - 24 | \\"layers\\": [ |
| 102 | + 24 | "layers": [ |
103 | 103 | > 25 | { |
104 | 104 | | ^ ☹️ name is missing here! |
105 | | - 26 | \\"flag\\": \\"flag\\", |
106 | | - 27 | \\"local\\": \\"local\\" |
107 | | - 28 | }" |
| 105 | + 26 | "flag": "flag", |
| 106 | + 27 | "local": "local" |
| 107 | + 28 | }] |
108 | 108 | `; |
109 | 109 |
|
110 | 110 | exports[`route > should throw on additional property 1`] = ` |
111 | | -"Validation of Edge Functions manifest failed |
| 111 | +[ManifestValidationError: Validation of Edge Functions manifest failed |
112 | 112 | ADDTIONAL PROPERTY must NOT have additional properties |
113 | 113 |
|
114 | | - 12 | \\"pattern\\": \\"^/hello/?$\\", |
115 | | - 13 | \\"generator\\": \\"@netlify/[email protected]\\", |
116 | | -> 14 | \\"foo\\": \\"bar\\" |
| 114 | + 12 | "pattern": "^/hello/?$", |
| 115 | + 13 | "generator": "@netlify/[email protected]", |
| 116 | +> 14 | "foo": "bar" |
117 | 117 | | ^^^^^ 😲 foo is not expected to be here! |
118 | 118 | 15 | } |
119 | 119 | 16 | ], |
120 | | - 17 | \\"post_cache_routes\\": [" |
| 120 | + 17 | "post_cache_routes": [] |
121 | 121 | `; |
122 | 122 |
|
123 | 123 | exports[`route > should throw on invalid pattern 1`] = ` |
124 | | -"Validation of Edge Functions manifest failed |
| 124 | +[ManifestValidationError: Validation of Edge Functions manifest failed |
125 | 125 | FORMAT pattern must be a regex that starts with ^ and ends with $ (e.g. ^/blog/[d]{4}$) |
126 | 126 |
|
127 | | - 10 | \\"name\\": \\"name\\", |
128 | | - 11 | \\"function\\": \\"hello\\", |
129 | | -> 12 | \\"pattern\\": \\"/^/hello/?$/\\", |
| 127 | + 10 | "name": "name", |
| 128 | + 11 | "function": "hello", |
| 129 | +> 12 | "pattern": "/^/hello/?$/", |
130 | 130 | | ^^^^^^^^^^^^^^ 👈🏽 format pattern must be a regex that starts with ^ and ends with $ (e.g. ^/blog/[d]{4}$) |
131 | | - 13 | \\"generator\\": \\"@netlify/[email protected]\\" |
| 131 | + 13 | "generator": "@netlify/[email protected]" |
132 | 132 | 14 | } |
133 | | - 15 | ]," |
| 133 | + 15 | ],] |
134 | 134 | `; |
135 | 135 |
|
136 | 136 | exports[`route > should throw on missing function 1`] = ` |
137 | | -"Validation of Edge Functions manifest failed |
| 137 | +[ManifestValidationError: Validation of Edge Functions manifest failed |
138 | 138 | REQUIRED must have required property 'function' |
139 | 139 |
|
140 | 140 | 7 | ], |
141 | | - 8 | \\"routes\\": [ |
| 141 | + 8 | "routes": [ |
142 | 142 | > 9 | { |
143 | 143 | | ^ ☹️ function is missing here! |
144 | | - 10 | \\"name\\": \\"name\\", |
145 | | - 11 | \\"pattern\\": \\"^/hello/?$\\", |
146 | | - 12 | \\"generator\\": \\"@netlify/[email protected]\\"" |
| 144 | + 10 | "name": "name", |
| 145 | + 11 | "pattern": "^/hello/?$", |
| 146 | + 12 | "generator": "@netlify/[email protected]"] |
147 | 147 | `; |
148 | 148 |
|
149 | 149 | exports[`route > should throw on missing pattern 1`] = ` |
150 | | -"Validation of Edge Functions manifest failed |
| 150 | +[ManifestValidationError: Validation of Edge Functions manifest failed |
151 | 151 | REQUIRED must have required property 'pattern' |
152 | 152 |
|
153 | 153 | 7 | ], |
154 | | - 8 | \\"routes\\": [ |
| 154 | + 8 | "routes": [ |
155 | 155 | > 9 | { |
156 | 156 | | ^ ☹️ pattern is missing here! |
157 | | - 10 | \\"name\\": \\"name\\", |
158 | | - 11 | \\"function\\": \\"hello\\", |
159 | | - 12 | \\"generator\\": \\"@netlify/[email protected]\\"" |
| 157 | + 10 | "name": "name", |
| 158 | + 11 | "function": "hello", |
| 159 | + 12 | "generator": "@netlify/[email protected]"] |
160 | 160 | `; |
161 | 161 |
|
162 | 162 | exports[`should show multiple errors 1`] = ` |
163 | | -"Validation of Edge Functions manifest failed |
| 163 | +[ManifestValidationError: Validation of Edge Functions manifest failed |
164 | 164 | ADDTIONAL PROPERTY must NOT have additional properties |
165 | 165 |
|
166 | 166 | 30 | ], |
167 | | - 31 | \\"bundler_version\\": \\"1.6.0\\", |
168 | | -> 32 | \\"foo\\": \\"bar\\", |
| 167 | + 31 | "bundler_version": "1.6.0", |
| 168 | +> 32 | "foo": "bar", |
169 | 169 | | ^^^^^ 😲 foo is not expected to be here! |
170 | | - 33 | \\"baz\\": \\"bar\\" |
| 170 | + 33 | "baz": "bar" |
171 | 171 | 34 | } |
172 | 172 |
|
173 | 173 | ADDTIONAL PROPERTY must NOT have additional properties |
174 | 174 |
|
175 | | - 31 | \\"bundler_version\\": \\"1.6.0\\", |
176 | | - 32 | \\"foo\\": \\"bar\\", |
177 | | -> 33 | \\"baz\\": \\"bar\\" |
| 175 | + 31 | "bundler_version": "1.6.0", |
| 176 | + 32 | "foo": "bar", |
| 177 | +> 33 | "baz": "bar" |
178 | 178 | | ^^^^^ 😲 baz is not expected to be here! |
179 | | - 34 | }" |
| 179 | + 34 | }] |
180 | 180 | `; |
181 | 181 |
|
182 | 182 | exports[`should throw on additional property on root level 1`] = ` |
183 | | -"Validation of Edge Functions manifest failed |
| 183 | +[ManifestValidationError: Validation of Edge Functions manifest failed |
184 | 184 | ADDTIONAL PROPERTY must NOT have additional properties |
185 | 185 |
|
186 | 186 | 30 | ], |
187 | | - 31 | \\"bundler_version\\": \\"1.6.0\\", |
188 | | -> 32 | \\"foo\\": \\"bar\\" |
| 187 | + 31 | "bundler_version": "1.6.0", |
| 188 | +> 32 | "foo": "bar" |
189 | 189 | | ^^^^^ 😲 foo is not expected to be here! |
190 | | - 33 | }" |
| 190 | + 33 | }] |
191 | 191 | `; |
0 commit comments