Restore native boot scheduling without an extra core request

This commit is contained in:
Jonathan Sykes
2026-10-08 11:25:03 +08:00
parent 9408ee07e5
commit 4b1f5204f8
12 changed files with 136 additions and 97 deletions

View File

@@ -30,8 +30,8 @@ test('Phase 4 preserves the exact player, continuity, tracking and queue bodies'
test('eager shell and Settings definitions load before app state and defer reading it',()=>{
const html=readFileSync(join(__dirname,'index.html'),'utf8');
for(const file of ['shell-core.js','views-core.js','section-rail.js']) {
assert.ok(html.indexOf('src="'+file+'"')<html.indexOf('src="app-bootstrap.js"'));
const vm=require('node:vm');const context=vm.createContext({window:{},document:{}});
assert.ok(html.indexOf('src="'+file+'"')<=html.indexOf('src="section-rail.js"'));
const vm=require('node:vm');const doc={readyState:'complete',addEventListener(){},createElement:()=>({}),head:{append(){}}};const globals={document:doc,Lazy:{manifest:{appCache:false},url:()=>'/app.js'},console};globals.window=globals;const context=vm.createContext(globals);
// Evaluation before any data/$/els/Player declaration must be safe.
vm.runInContext(readFileSync(join(__dirname,file),'utf8'),context);
}