migrate Cloudflare Workers implementation to v3 [#80]

This commit is contained in:
Brandon Liu
2022-10-19 09:15:09 +08:00
parent 5a636313e9
commit b62f8f3675
8 changed files with 2350 additions and 593 deletions

View File

@@ -0,0 +1,17 @@
import { test } from "zora";
import { pmtiles_path } from "./index";
test("pmtiles path", (assertion) => {
let result = pmtiles_path(undefined, "foo");
assertion.equal(result, "foo.pmtiles");
});
test("pmtiles path", (assertion) => {
let result = pmtiles_path("folder/{name}/file.pmtiles", "foo");
assertion.equal(result, "folder/foo/file.pmtiles");
});
test("pmtiles path with slash", (assertion) => {
let result = pmtiles_path("folder/{name}/file.pmtiles", "foo/bar");
assertion.equal(result, "folder/foo/bar/file.pmtiles");
});