18 lines
764 B
JavaScript
18 lines
764 B
JavaScript
import test from "node:test";
|
|
import assert from "node:assert/strict";
|
|
import { readFileSync } from "node:fs";
|
|
|
|
const read = (f) => readFileSync(new URL(`../src/${f}`, import.meta.url), "utf8");
|
|
|
|
// WTC-22: удобство на телефоне
|
|
test("Сценарий: Основные кнопки на узком экране", () => {
|
|
assert.match(read("index.html"), /name="viewport" content="width=device-width, initial-scale=1"/);
|
|
const css = read("style.css");
|
|
assert.match(css, /body \{[^}]*font: 18px/);
|
|
assert.match(css, /button, input \{[^}]*min-height: 48px/);
|
|
});
|
|
|
|
test("Сценарий: Карточка рецепта на узком экране", () => {
|
|
assert.match(read("style.css"), /\.recipe \{[^}]*overflow-wrap: anywhere/);
|
|
});
|