mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-14 20:14:39 +00:00
consistent query parameter handling between client and server - fixes #497
This commit is contained in:
@@ -204,7 +204,7 @@ describe('basics', function() {
|
||||
|
||||
assert.equal(
|
||||
await title(),
|
||||
'message: ""'
|
||||
'{"message":""}'
|
||||
);
|
||||
});
|
||||
|
||||
@@ -217,7 +217,29 @@ describe('basics', function() {
|
||||
|
||||
assert.equal(
|
||||
await title(),
|
||||
'message: ""'
|
||||
'{"message":""}'
|
||||
);
|
||||
});
|
||||
|
||||
it('accepts duplicated query string parameter on server', async () => {
|
||||
await page.goto(`${base}/echo-query?p=one&p=two`);
|
||||
|
||||
assert.equal(
|
||||
await title(),
|
||||
'{"p":["one","two"]}'
|
||||
);
|
||||
});
|
||||
|
||||
it('accepts duplicated query string parameter on client', async () => {
|
||||
await page.goto(base);
|
||||
await start();
|
||||
await prefetchRoutes();
|
||||
|
||||
await page.click('a[href="echo-query?p=one&p=two"]')
|
||||
|
||||
assert.equal(
|
||||
await title(),
|
||||
'{"p":["one","two"]}'
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user