AT Mot — a bilingual (EN/FR) daily word game native to the AT Protocol.
0

Configure Feed

Select the types of activity you want to include in your feed.

Add committed PWA raster icons generated from icon.svg

+30
public/apple-touch-icon.png

This is a binary file and will not be displayed.

public/icon-192.png

This is a binary file and will not be displayed.

public/icon-512.png

This is a binary file and will not be displayed.

+30
tests/pwa.test.ts
··· 1 + import { describe, expect, it } from 'vitest'; 2 + import { readFileSync, existsSync } from 'node:fs'; 3 + import { fileURLToPath } from 'node:url'; 4 + 5 + // Resolve paths relative to the repo root (this file is in tests/). 6 + const root = fileURLToPath(new URL('..', import.meta.url)); 7 + const p = (rel: string) => root + rel; 8 + 9 + /** Read width/height from a PNG's IHDR chunk (bytes 16–24, big-endian). */ 10 + function pngSize(path: string): { width: number; height: number } { 11 + const buf = readFileSync(path); 12 + return { width: buf.readUInt32BE(16), height: buf.readUInt32BE(20) }; 13 + } 14 + 15 + describe('PWA icons', () => { 16 + const icons: Array<[string, number]> = [ 17 + ['public/icon-192.png', 192], 18 + ['public/icon-512.png', 512], 19 + ['public/apple-touch-icon.png', 180], 20 + ]; 21 + 22 + for (const [rel, size] of icons) { 23 + it(`${rel} exists and is ${size}x${size}`, () => { 24 + expect(existsSync(p(rel)), `${rel} missing`).toBe(true); 25 + const { width, height } = pngSize(p(rel)); 26 + expect(width).toBe(size); 27 + expect(height).toBe(size); 28 + }); 29 + } 30 + });