Исправить регистр ключей и ответные связи

This commit is contained in:
AidarKC
2026-11-19 18:45:57 +03:00
parent 0274183730
commit 8f3b81c368
13 changed files with 210 additions and 23 deletions
@@ -0,0 +1,19 @@
import test from 'node:test';
import assert from 'node:assert/strict';
import { readFileSync } from 'node:fs';
const page = readFileSync(new URL('../js/pages/notifications-view.js', import.meta.url), 'utf8');
const css = readFileSync(new URL('../styles/features/notifications.css', import.meta.url), 'utf8');
test('уведомление показывает логин автора под отображаемым именем', () => {
assert.match(page, /notification-card__login/);
assert.match(page, /login\.textContent = item\.sourceLogin/);
assert.match(css, /\.notification-card__login/);
});
test('ответная связь повторяет тип входящей связи', () => {
assert.match(page, /CONNECTION_CLOSE_FRIEND[\s\S]*\? 'close_friend'[\s\S]*: 'friend'/);
assert.match(page, /kind, enabled: true/);
assert.match(page, /text_072/);
assert.match(page, /text_073/);
});