Cache the page-owned app response before starting the worker
This commit is contained in:
@@ -98,3 +98,14 @@ test('classic first-visit style preload is discovered before the head loader wit
|
||||
assert.ok(html.indexOf(preload[0])<html.indexOf('src="lazy.js"'));
|
||||
assert.ok(!/<link\b[^>]*rel="stylesheet"[^>]*href="theme-classic.css"/.test(html),'the selected layout remains parser-applied by the loader');
|
||||
});
|
||||
|
||||
|
||||
test('the eager cache bootstrap stays last and retains app.js in core and legacy shell',()=>{
|
||||
const {groups}=JSON.parse(readFileSync(join(__dirname,'assets.json'),'utf8'));
|
||||
assert.ok(groups.core.files.includes('/app-bootstrap.js'));
|
||||
assert.ok(groups.core.files.includes('/app.js'));
|
||||
assert.ok(listed.has('/app-bootstrap.js')&&listed.has('/app.js'));
|
||||
assert.ok(html.indexOf('src="app-bootstrap.js"')>html.indexOf('src="section-rail.js"'));
|
||||
assert.ok(html.includes("'sha256-__APP_SCRIPT_HASH__'"));
|
||||
assert.ok(readFileSync(join(__dirname,'lazy.js'),'utf8').includes("api.appResponse=(async()=>"));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user