what-to-cook/test/pick-hint.test.js
Peppa b9113e6f2d
All checks were successful
peppa/lint lint: success за 1с
peppa/test test: success за 0с
peppa/build build: success за 1с
ci / checks (pull_request) Successful in 3s
deploy / deploy (pull_request) Successful in 13s
WTC-24: подсказка про случайный выбор рядом с кнопкой
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-16 06:26:46 +05:00

17 lines
832 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import test from "node:test";
import assert from "node:assert/strict";
import { readFileSync } from "node:fs";
import { messages } from "../src/i18n.js";
test("Сценарий: рядом с кнопкой подсказка про случайное блюдо на всех языках", () => {
for (const l of ["ru", "kk", "en"]) assert.ok(messages[l].pickHint.length > 10);
assert.match(messages.ru.pickHint, /случайное блюдо/);
const a = readFileSync(new URL("../src/app.js", import.meta.url), "utf8");
assert.match(a, /t\.pickHint/);
});
test("Сценарий: у каждой кнопки в списке есть подпись", () => {
const a = readFileSync(new URL("../src/app.js", import.meta.url), "utf8");
assert.match(a, /removeLabel/);
assert.ok(messages.ru.remove.length > 0);
});