import assert from 'node:assert/strict'; import test from 'node:test'; import React from 'react'; import { renderToStaticMarkup } from 'react-dom/server'; import { I18nProvider } from '../../../application/i18n/I18nProvider'; import { PluginPackageDetails } from './PluginPackageManager'; test('package detail renders manifest resources as text and explains advanced authority', () => { const plugin = { id: 'com.example.synthetic', enabled: false, activeVersion: '1.0.0', archiveSha256: 'a'.repeat(64), manifest: { manifestVersion: 1, id: 'com.example.synthetic', name: 'synthetic', version: '1.0.0', publisher: 'example', engines: { netcatty: '>=1.0.0 <2.0.0', api: '0.1.0-internal' }, main: { node: 'index.js' }, permissions: { required: [{ permission: 'network', resources: ['https://example.com'], reason: '' }] }, }, runtime: { status: 'stopped', kind: null, lastError: null, quarantinedAt: null }, } as NetcattyInstalledPlugin; const html = renderToStaticMarkup(); assert.match(html, /full Node filesystem and network authority/); assert.match(html, /https:\/\/example.com/); assert.match(html, /<script>/); assert.doesNotMatch(html, /