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