mirror of
https://github.com/protomaps/PMTiles.git
synced 2026-02-04 10:51:07 +00:00
* CI: bump from node 18.x to 22.x [#606] * update cloudflare wrangler version * fix tests for node 22
This commit is contained in:
@@ -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 () => {
|
||||
|
||||
Reference in New Issue
Block a user