1module.exports = { 2 'username': [ 3 { 4 'comment': 'Surrogate pair', 5 'href': 'https://github.com/', 6 'new_value': '\uD83D\uDE00', 7 'expected': { 8 'href': 'https://%F0%9F%98%80@github.com/', 9 'username': '%F0%9F%98%80' 10 } 11 }, 12 { 13 'comment': 'Unpaired low surrogate 1', 14 'href': 'https://github.com/', 15 'new_value': '\uD83D', 16 'expected': { 17 'href': 'https://%EF%BF%BD@github.com/', 18 'username': '%EF%BF%BD' 19 } 20 }, 21 { 22 'comment': 'Unpaired low surrogate 2', 23 'href': 'https://github.com/', 24 'new_value': '\uD83Dnode', 25 'expected': { 26 'href': 'https://%EF%BF%BDnode@github.com/', 27 'username': '%EF%BF%BDnode' 28 } 29 }, 30 { 31 'comment': 'Unpaired high surrogate 1', 32 'href': 'https://github.com/', 33 'new_value': '\uDE00', 34 'expected': { 35 'href': 'https://%EF%BF%BD@github.com/', 36 'username': '%EF%BF%BD' 37 } 38 }, 39 { 40 'comment': 'Unpaired high surrogate 2', 41 'href': 'https://github.com/', 42 'new_value': '\uDE00node', 43 'expected': { 44 'href': 'https://%EF%BF%BDnode@github.com/', 45 'username': '%EF%BF%BDnode' 46 } 47 } 48 ], 49 'password': [ 50 { 51 'comment': 'Surrogate pair', 52 'href': 'https://github.com/', 53 'new_value': '\uD83D\uDE00', 54 'expected': { 55 'href': 'https://:%F0%9F%98%80@github.com/', 56 'password': '%F0%9F%98%80' 57 } 58 }, 59 { 60 'comment': 'Unpaired low surrogate 1', 61 'href': 'https://github.com/', 62 'new_value': '\uD83D', 63 'expected': { 64 'href': 'https://:%EF%BF%BD@github.com/', 65 'password': '%EF%BF%BD' 66 } 67 }, 68 { 69 'comment': 'Unpaired low surrogate 2', 70 'href': 'https://github.com/', 71 'new_value': '\uD83Dnode', 72 'expected': { 73 'href': 'https://:%EF%BF%BDnode@github.com/', 74 'password': '%EF%BF%BDnode' 75 } 76 }, 77 { 78 'comment': 'Unpaired high surrogate 1', 79 'href': 'https://github.com/', 80 'new_value': '\uDE00', 81 'expected': { 82 'href': 'https://:%EF%BF%BD@github.com/', 83 'password': '%EF%BF%BD' 84 } 85 }, 86 { 87 'comment': 'Unpaired high surrogate 2', 88 'href': 'https://github.com/', 89 'new_value': '\uDE00node', 90 'expected': { 91 'href': 'https://:%EF%BF%BDnode@github.com/', 92 'password': '%EF%BF%BDnode' 93 } 94 } 95 ], 96 'pathname': [ 97 { 98 'comment': 'Surrogate pair', 99 'href': 'https://github.com/', 100 'new_value': '/\uD83D\uDE00', 101 'expected': { 102 'href': 'https://github.com/%F0%9F%98%80', 103 'pathname': '/%F0%9F%98%80' 104 } 105 }, 106 { 107 'comment': 'Unpaired low surrogate 1', 108 'href': 'https://github.com/', 109 'new_value': '/\uD83D', 110 'expected': { 111 'href': 'https://github.com/%EF%BF%BD', 112 'pathname': '/%EF%BF%BD' 113 } 114 }, 115 { 116 'comment': 'Unpaired low surrogate 2', 117 'href': 'https://github.com/', 118 'new_value': '/\uD83Dnode', 119 'expected': { 120 'href': 'https://github.com/%EF%BF%BDnode', 121 'pathname': '/%EF%BF%BDnode' 122 } 123 }, 124 { 125 'comment': 'Unpaired high surrogate 1', 126 'href': 'https://github.com/', 127 'new_value': '/\uDE00', 128 'expected': { 129 'href': 'https://github.com/%EF%BF%BD', 130 'pathname': '/%EF%BF%BD' 131 } 132 }, 133 { 134 'comment': 'Unpaired high surrogate 2', 135 'href': 'https://github.com/', 136 'new_value': '/\uDE00node', 137 'expected': { 138 'href': 'https://github.com/%EF%BF%BDnode', 139 'pathname': '/%EF%BF%BDnode' 140 } 141 } 142 ], 143 'search': [ 144 { 145 'comment': 'Surrogate pair', 146 'href': 'https://github.com/', 147 'new_value': '\uD83D\uDE00', 148 'expected': { 149 'href': 'https://github.com/?%F0%9F%98%80', 150 'search': '?%F0%9F%98%80' 151 } 152 }, 153 { 154 'comment': 'Unpaired low surrogate 1', 155 'href': 'https://github.com/', 156 'new_value': '\uD83D', 157 'expected': { 158 'href': 'https://github.com/?%EF%BF%BD', 159 'search': '?%EF%BF%BD' 160 } 161 }, 162 { 163 'comment': 'Unpaired low surrogate 2', 164 'href': 'https://github.com/', 165 'new_value': '\uD83Dnode', 166 'expected': { 167 'href': 'https://github.com/?%EF%BF%BDnode', 168 'search': '?%EF%BF%BDnode' 169 } 170 }, 171 { 172 'comment': 'Unpaired high surrogate 1', 173 'href': 'https://github.com/', 174 'new_value': '\uDE00', 175 'expected': { 176 'href': 'https://github.com/?%EF%BF%BD', 177 'search': '?%EF%BF%BD' 178 } 179 }, 180 { 181 'comment': 'Unpaired high surrogate 2', 182 'href': 'https://github.com/', 183 'new_value': '\uDE00node', 184 'expected': { 185 'href': 'https://github.com/?%EF%BF%BDnode', 186 'search': '?%EF%BF%BDnode' 187 } 188 } 189 ], 190 'hash': [ 191 { 192 'comment': 'Surrogate pair', 193 'href': 'https://github.com/', 194 'new_value': '\uD83D\uDE00', 195 'expected': { 196 'href': 'https://github.com/#%F0%9F%98%80', 197 'hash': '#%F0%9F%98%80' 198 } 199 }, 200 { 201 'comment': 'Unpaired low surrogate 1', 202 'href': 'https://github.com/', 203 'new_value': '\uD83D', 204 'expected': { 205 'href': 'https://github.com/#%EF%BF%BD', 206 'hash': '#%EF%BF%BD' 207 } 208 }, 209 { 210 'comment': 'Unpaired low surrogate 2', 211 'href': 'https://github.com/', 212 'new_value': '\uD83Dnode', 213 'expected': { 214 'href': 'https://github.com/#%EF%BF%BDnode', 215 'hash': '#%EF%BF%BDnode' 216 } 217 }, 218 { 219 'comment': 'Unpaired high surrogate 1', 220 'href': 'https://github.com/', 221 'new_value': '\uDE00', 222 'expected': { 223 'href': 'https://github.com/#%EF%BF%BD', 224 'hash': '#%EF%BF%BD' 225 } 226 }, 227 { 228 'comment': 'Unpaired high surrogate 2', 229 'href': 'https://github.com/', 230 'new_value': '\uDE00node', 231 'expected': { 232 'href': 'https://github.com/#%EF%BF%BDnode', 233 'hash': '#%EF%BF%BDnode' 234 } 235 } 236 ] 237}; 238