|
|
|
|
@ -74,6 +74,25 @@ test('URLSearchParams.set updates when duplicate values collapse to the same joi
|
|
|
|
|
cleanup();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
test('URLSearchParams.set updates when duplicate values collapse to the same comma-joined string', () => {
|
|
|
|
|
const params = new SvelteURLSearchParams('a=a&a=b');
|
|
|
|
|
const log: any = [];
|
|
|
|
|
|
|
|
|
|
const cleanup = effect_root(() => {
|
|
|
|
|
render_effect(() => {
|
|
|
|
|
log.push(params.toString());
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
flushSync(() => {
|
|
|
|
|
params.set('a', 'a,b');
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
assert.deepEqual(log, ['a=a&a=b', 'a=a%2Cb']);
|
|
|
|
|
|
|
|
|
|
cleanup();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
test('URLSearchParams.append', () => {
|
|
|
|
|
const params = new SvelteURLSearchParams();
|
|
|
|
|
const log: any = [];
|
|
|
|
|
|