统一仪表盘、AI 回复、卡密、扫码和通知等前后端行为,补齐并发与失败恢复测试。新增 MySQL 8.4、PostgreSQL 17 持久化 Docker 功能测试和 SQLite 脱敏播种工具。
17 lines
595 B
TypeScript
17 lines
595 B
TypeScript
import { describe, expect, test } from 'vitest';
|
|
import { shouldSaveNotificationBindings } from './accountBindings';
|
|
|
|
describe('notification binding save guard', () => {
|
|
test('does not overwrite bindings when loading failed', () => {
|
|
expect(shouldSaveNotificationBindings(false, true)).toBe(false);
|
|
});
|
|
|
|
test('does not write unchanged bindings', () => {
|
|
expect(shouldSaveNotificationBindings(true, false)).toBe(false);
|
|
});
|
|
|
|
test('writes an explicitly changed, successfully loaded selection', () => {
|
|
expect(shouldSaveNotificationBindings(true, true)).toBe(true);
|
|
});
|
|
});
|