Separate runtime manifest inputs from directly served files
This commit is contained in:
@@ -88,3 +88,13 @@ test('layout-independent visibility and transport defaults stay in eager CSS',()
|
||||
for(const selector of ['.stg-overlay','.deck-chips','.np-btn.done .i-save','.sleep-status .sl-ic','.ab-group','.mc-tune'])assert.ok(shared.includes(selector));
|
||||
assert.ok(html.includes('href="layout-base.css"'));
|
||||
});
|
||||
|
||||
|
||||
test('runtime exclusion rules never remove shell or declared dynamic assets', async () => {
|
||||
const { isRuntimeAsset } = await import('../server/asset-manifest.js');
|
||||
const definition = JSON.parse(readFileSync(join(__dirname, 'assets.json'), 'utf8'));
|
||||
for (const asset of new Set([...shell.filter(p => p !== '/'), ...Object.values(definition.groups).flatMap(g => g.files)])) {
|
||||
assert.ok(isRuntimeAsset(asset, definition), `${asset} remains a runtime asset`);
|
||||
}
|
||||
for (const asset of ['/app.test.js', '/nested/probe.test.mjs', '/README.md', '/fonts/font-OFL.txt', '/admin.html', '/perf/fixture.js']) assert.equal(isRuntimeAsset(asset, definition), false, asset);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user