CI: bump from node 18.x to 22.x [#606] (#614)

* CI: bump from node 18.x to 22.x [#606]

* update cloudflare wrangler version

* fix tests for node 22
This commit is contained in:
Brandon Liu
2025-12-01 17:02:39 +08:00
committed by GitHub
parent ec103efdff
commit 4dc2daad8a
4 changed files with 349 additions and 379 deletions

View File

@@ -418,15 +418,21 @@ test("pmtiles get TileJSON", async () => {
assert.equal("2", tilejson.version);
});
const originalUserAgent = navigator.userAgent;
describe("user agent", async () => {
beforeEach(() => {
// @ts-ignore
global.navigator = { userAgent: "Windows Chrome" };
Object.defineProperty(globalThis.navigator, "userAgent", {
value: "Windows Chrome",
configurable: true,
});
});
afterEach(() => {
// @ts-ignore
global.navigator.userAgent = undefined;
Object.defineProperty(globalThis.navigator, "userAgent", {
value: originalUserAgent,
configurable: true,
});
});
it("works around caching bug on chrome on windows", async () => {