Open History to see the last commit
1import { describe, expect, it } from "vite-plus/test";
2
3import { tanStackSourceRepositoryPath } from "./tanStackSourceHosts.ts";
4
5describe("tanStackSourceRepositoryPath", () => {
6 it.each([
7 ["acme/web", "acme/web"],
8 ["@acme/web", "acme/web"],
9 // Clients without this host's definition percent-encode the owner's `@`.
10 ["%40acme/web", "acme/web"],
11 ["/@acme/web.git/", "acme/web"],
12 ["acme/web.private", "acme/web.private"],
13 ["acme", null],
14 ["acme/web/extra", null],
15 ["acme/..", null],
16 ])("reads %s as %s", (path, repository) => {
17 expect(tanStackSourceRepositoryPath(path)).toBe(repository);
18 });
19});