mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-03-11 21:27:05 +00:00
Merge branch 'development' of github.com:Stremio/stremio-web into installed-addons
This commit is contained in:
commit
43b685e1da
1 changed files with 10 additions and 10 deletions
|
|
@ -118,11 +118,21 @@ describe('routesRegexp', () => {
|
|||
.toEqual(['/library', undefined, undefined]);
|
||||
});
|
||||
|
||||
it('match /library/', async () => {
|
||||
expect(Array.from('/library/'.match(routesRegexp.library.regexp)))
|
||||
.toEqual(['/library/', '', undefined]);
|
||||
});
|
||||
|
||||
it('match /library//', async () => {
|
||||
expect(Array.from('/library//'.match(routesRegexp.library.regexp)))
|
||||
.toEqual(['/library//', '', '']);
|
||||
});
|
||||
|
||||
it('match /library/1', async () => {
|
||||
expect(Array.from('/library/1'.match(routesRegexp.library.regexp)))
|
||||
.toEqual(['/library/1', '1', undefined]);
|
||||
});
|
||||
|
||||
it('match /library/1/', async () => {
|
||||
expect(Array.from('/library/1/'.match(routesRegexp.library.regexp)))
|
||||
.toEqual(['/library/1/', '1', '']);
|
||||
|
|
@ -138,21 +148,11 @@ describe('routesRegexp', () => {
|
|||
.toEqual(['/library/1/2', '1', '2']);
|
||||
});
|
||||
|
||||
it('not match /library/', async () => {
|
||||
expect('/library/'.match(routesRegexp.library.regexp))
|
||||
.toBe(null);
|
||||
});
|
||||
|
||||
it('not match /library///', async () => {
|
||||
expect('/library///'.match(routesRegexp.library.regexp))
|
||||
.toBe(null);
|
||||
});
|
||||
|
||||
it('not match /library/1', async () => {
|
||||
expect('/library/1'.match(routesRegexp.library.regexp))
|
||||
.toBe(null);
|
||||
});
|
||||
|
||||
it('not match /library/1/2/', async () => {
|
||||
expect('/library/1/2/'.match(routesRegexp.library.regexp))
|
||||
.toBe(null);
|
||||
|
|
|
|||
Loading…
Reference in a new issue