Files
memind/plaza-ops.test.mjs
John 2e14873f2d Initial commit: Memind H5 portal with MindSpace, Plaza, and agent jobs.
Track application source and tests; exclude local env, user workspaces, and runtime data via .gitignore.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-15 15:04:43 -07:00

22 lines
854 B
JavaScript

import assert from 'node:assert/strict';
import test from 'node:test';
import { hasOpsRole, opsInternals } from './plaza-ops.mjs';
test('hasOpsRole respects role hierarchy', () => {
assert.equal(hasOpsRole('ops_admin', 'reviewer'), true);
assert.equal(hasOpsRole('editor', 'reviewer'), true);
assert.equal(hasOpsRole('reviewer', 'editor'), false);
assert.equal(hasOpsRole('none', 'reviewer'), false);
});
test('REPORT_REASONS contains documented values', () => {
assert.ok(opsInternals.REPORT_REASONS.has('spam'));
assert.ok(opsInternals.REPORT_REASONS.has('other'));
});
test('FEATURED_POSITIONS contains homepage and trending', () => {
assert.ok(opsInternals.FEATURED_POSITIONS.has('homepage_banner'));
assert.ok(opsInternals.FEATURED_POSITIONS.has('trending'));
assert.ok(opsInternals.FEATURED_POSITIONS.has('category_top'));
});