'use strict'; const assert = require('assert'); const fs = require('fs'); const path = require('path'); const client = fs.readFileSync(path.join(__dirname, '..', 'public', 'client.js'), 'utf8'); assert( client.includes("'show.bs.dropdown.westgateSupport'"), 'client.js should fetch the support inbox when its dropdown opens' ); assert( client.includes("'/plugins/support/notifications'"), 'client.js should load the support inbox from the plugin API via the api module (for CSRF-safe writes)' ); assert( client.includes("'/plugins/support/notifications/read'"), 'client.js should mark the support inbox read when it is opened with unread entries' ); assert( client.includes('renderSupportMenu'), 'client.js should expose the support inbox menu renderer' ); assert( /textContent/.test(client) && !/innerHTML\s*=[^=]*bodyShort/.test(client), 'Support inbox entry text must be inserted via textContent, never innerHTML' );