mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-16 19:00:38 +09:00
21 lines
829 B
TypeScript
21 lines
829 B
TypeScript
|
|
import { readFileSync } from "node:fs";
|
||
|
|
import { resolve } from "node:path";
|
||
|
|
import { fileURLToPath } from "node:url";
|
||
|
|
import { describe, expect, it } from "vitest";
|
||
|
|
|
||
|
|
const uiRoot = resolve(fileURLToPath(new URL("../..", import.meta.url)));
|
||
|
|
|
||
|
|
describe("PWA install mode", () => {
|
||
|
|
it("opens home-screen launches with browser controls visible", () => {
|
||
|
|
const manifest = JSON.parse(readFileSync(resolve(uiRoot, "public/site.webmanifest"), "utf8")) as {
|
||
|
|
display?: string;
|
||
|
|
};
|
||
|
|
const html = readFileSync(resolve(uiRoot, "index.html"), "utf8");
|
||
|
|
|
||
|
|
expect(manifest.display).toBe("browser");
|
||
|
|
expect(html).not.toContain('name="mobile-web-app-capable"');
|
||
|
|
expect(html).not.toContain('name="apple-mobile-web-app-capable"');
|
||
|
|
expect(html).not.toContain('name="apple-mobile-web-app-status-bar-style"');
|
||
|
|
});
|
||
|
|
});
|