sendou.ink/app/utils/string.test.ts
Kalle 700a309e7f
Migrate Node -> Bun (#1827)
* Initial

* Faster user page

* Remove redundant function

* Favorite badge sorting

* Upgrade deps

* Simplify entry.server

* Bun tests initial

* Update package.json npm -> bun

* Update README

* Type safe translations again

* Don't load streams info for finalized tournaments

* Translations as an object

* More unit test work

* Convert match.server.test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* Test & all done

* Working cf

* Bun GA try

* No cache

* spacing

* spacing 2

* Add SQL logging

* Remove NR

* Hmm

* Hmm 2

* Interesting

* SKALOP_SYSTEM_MESSAGE_URL

* .

* .

* ?

* .

* ?

* Server.ts adjust

* Downgrade Tldraw

* E2E test fix

* Fix lint
2024-08-11 16:09:41 +03:00

15 lines
422 B
TypeScript

import { describe, expect, test } from "bun:test";
import { pathnameFromPotentialURL } from "./strings";
describe("pathnameFromPotentialURL()", () => {
test("Resolves path name from valid URL", () => {
expect(pathnameFromPotentialURL("https://twitter.com/sendouc")).toBe(
"sendouc",
);
});
test("Returns string as is if not URL", () => {
expect(pathnameFromPotentialURL("sendouc")).toBe("sendouc");
});
});