Files
Investidor-V2/tests/frontend/editorial-dashboard-manifest.test.mjs
T
2026-11-14 12:04:52 +02:00

14 lines
821 B
JavaScript

import test from 'node:test';
import assert from 'node:assert/strict';
import fs from 'node:fs';
import path from 'node:path';
import {fileURLToPath} from 'node:url';
test('compiled dashboard remains a resolvable page entry for authenticated full HTML', () => {
const manifestPath=process.env.EDITORIAL_BUILD_MANIFEST || fileURLToPath(new URL('../../public/build/manifest.json',import.meta.url));
const manifest=JSON.parse(fs.readFileSync(manifestPath,'utf8'));
const key='resources/js/pages/management/editorial-workflow.tsx';
assert.ok(manifest[key], 'Dashboard page entry missing; a shared chunk cannot satisfy the server-rendered Vite directive');
assert.equal(manifest[key].isDynamicEntry || manifest[key].isEntry, true);
assert.ok(fs.existsSync(path.join(path.dirname(manifestPath),manifest[key].file)));
});