mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-19 05:26:47 +00:00
724c88c201
A mechanical prettier --write over server/src, server/tests, server/scripts and shared/src with the workspaces' .prettierrc; nothing but layout and import order changes, and every file keeps the same set of imports. shared is formatted throughout and its format baseline is empty. The server baseline keeps the 35 files that Prettier would grow past their lint:size limit (they need a split first, which is not a formatting change), and the generated entity files stay as their generator writes them.
17 lines
581 B
TypeScript
17 lines
581 B
TypeScript
import { KNOWN_PERMISSIONS } from '../../../src/nest/plugins/protocol/envelope';
|
|
import { SNAPSHOT_GRANT, ENTITY_ID_KEYS } from '../../../src/plugin-event-sink';
|
|
|
|
import { it, expect } from 'vitest';
|
|
|
|
it('every snapshot grant is a known db:read permission', () => {
|
|
for (const p of Object.values(SNAPSHOT_GRANT)) {
|
|
expect(KNOWN_PERMISSIONS).toContain(p);
|
|
expect(p).toMatch(/^db:read:/);
|
|
}
|
|
});
|
|
it('every snapshot family has an id-key path', () => {
|
|
for (const family of Object.keys(SNAPSHOT_GRANT)) {
|
|
expect(Object.keys(ENTITY_ID_KEYS)).toContain(family);
|
|
}
|
|
});
|