Files
kid_dash/webapp/test/framed-screen-scaling.test.mjs
2026-09-14 22:40:15 -04:00

15 lines
564 B
JavaScript

import test from 'node:test'
import assert from 'node:assert/strict'
import { readFile } from 'node:fs/promises'
const css = await readFile(new URL('../src/index.css', import.meta.url), 'utf8')
test('keeps the native screen size ahead of inline app dimensions', () => {
assert.match(css, /\.kiddos-screen\s*\{[^}]*width:\s*800px\s*!important/s)
assert.match(css, /\.kiddos-screen\s*\{[^}]*height:\s*480px\s*!important/s)
})
test('uses the requested 1.6 zoom for the browser preview', () => {
assert.match(css, /\.kiddos-screen\s*\{[^}]*zoom:\s*1\.6/s)
})