This commit is contained in:
tamaina 2025-08-30 19:03:08 +09:00
parent 8bb6b363c6
commit b277b6ef55
1 changed files with 2 additions and 3 deletions

View File

@ -51,9 +51,8 @@ function testParseUrl(fn: (acct: string) => acct.Acct) {
expect(() => fn('https://example.com/@')).toThrowError(); expect(() => fn('https://example.com/@')).toThrowError();
}); });
it('parses url ended with /', () => { it('throws ended with /', () => {
const res = fn('https://example.com/@alice/'); expect(() => fn('https://example.com/@alice/')).toThrowError();
expect(res).toEqual({ username: 'alice', host: 'example.com' });
}); });
it('throws url have @username path but ended with sub directory', () => { it('throws url have @username path but ended with sub directory', () => {