mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-08-09 12:40:59 +00:00
7820949d3a
Co-authored-by: dadachann <185672915+dadachann@users.noreply.github.com>
25 lines
764 B
JavaScript
25 lines
764 B
JavaScript
import assert from 'node:assert/strict';
|
|
import { readFile } from 'node:fs/promises';
|
|
import test from 'node:test';
|
|
|
|
const panelSource = await readFile(
|
|
new URL(
|
|
'../../src/app/home/components/workspace-settings/WorkspaceSettingsPanel.tsx',
|
|
import.meta.url,
|
|
),
|
|
'utf8',
|
|
);
|
|
const entitySource = await readFile(
|
|
new URL('../../src/app/infra/entities/workspace.ts', import.meta.url),
|
|
'utf8',
|
|
);
|
|
|
|
test('workspace member rows show display name, email, and role', () => {
|
|
assert.match(entitySource, /display_name:\s*string/);
|
|
assert.match(panelSource, /\{member\.display_name\}/);
|
|
assert.match(
|
|
panelSource,
|
|
/<ItemDescription[^>]*>[\s\S]*?\{member\.email\}[\s\S]*?workspace\.roles\.\$\{member\.role\}[\s\S]*?<\/ItemDescription>/,
|
|
);
|
|
});
|