import assert from 'node:assert/strict' import { readFileSync } from 'node:fs' import test from 'node:test' import { fileURLToPath } from 'node:url' const sidebar = readFileSync( fileURLToPath(new URL('../src/components/layout/SidebarRail.vue', import.meta.url)), 'utf8' ) const documentInbox = readFileSync( fileURLToPath(new URL('../src/composables/useDocumentCenterInbox.js', import.meta.url)), 'utf8' ) const documentNewState = readFileSync( fileURLToPath(new URL('../src/utils/documentCenterNewState.js', import.meta.url)), 'utf8' ) test('sidebar renders a red dot for unread document center rows', () => { assert.match(sidebar, /useDocumentCenterInbox/) assert.match(sidebar, /hasUnread: documentInboxHasUnread/) assert.match(sidebar, /