feat(core): hash router option - browse site offline (experimental) (#9859)

This commit is contained in:
Sébastien Lorber 2024-05-19 15:44:58 +02:00 committed by GitHub
parent b73ad1ece5
commit 17f3e02a42
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
38 changed files with 1018 additions and 266 deletions

View file

@ -90,6 +90,30 @@ describe('normalizeUrl', () => {
input: ['http://foobar.com', '', 'test', '/'],
output: 'http://foobar.com/test/',
},
{
input: ['http://foobar.com/', '', 'test', '/'],
output: 'http://foobar.com/test/',
},
{
input: ['http://foobar.com', '#', 'test'],
output: 'http://foobar.com/#/test',
},
{
input: ['http://foobar.com/', '#', 'test'],
output: 'http://foobar.com/#/test',
},
{
input: ['http://foobar.com', '/#/', 'test'],
output: 'http://foobar.com/#/test',
},
{
input: ['http://foobar.com', '#/', 'test'],
output: 'http://foobar.com/#/test',
},
{
input: ['http://foobar.com', '/#', 'test'],
output: 'http://foobar.com/#/test',
},
{
input: ['/', '', 'hello', '', '/', '/', '', '/', '/world'],
output: '/hello/world',