mirror of
https://github.com/koala73/worldmonitor.git
synced 2026-04-25 17:14:57 +02:00
fix(pwa): disable default navigateFallback in generated SW
This commit is contained in:
@@ -35,6 +35,11 @@ describe('deploy/cache configuration guardrails', () => {
|
||||
assert.doesNotMatch(viteConfigSource, /globPatterns:\s*\['\*\*\/\*\.\{js,css,html/);
|
||||
});
|
||||
|
||||
it('explicitly disables navigateFallback when HTML is not precached', () => {
|
||||
assert.match(viteConfigSource, /navigateFallback:\s*null/);
|
||||
assert.doesNotMatch(viteConfigSource, /navigateFallbackDenylist:\s*\[/);
|
||||
});
|
||||
|
||||
it('uses network-first runtime caching for navigation requests', () => {
|
||||
assert.match(viteConfigSource, /request\.mode === 'navigate'/);
|
||||
assert.match(viteConfigSource, /handler:\s*'NetworkFirst'/);
|
||||
|
||||
Reference in New Issue
Block a user