fix(gateway-ui): refresh service worker and static cache headers
This commit is contained in:
@@ -295,6 +295,7 @@ describe('GatewayServer integration', () => {
|
||||
const res = await fetch(`http://127.0.0.1:${TEST_PORT}/`);
|
||||
expect(res.status).toBe(200);
|
||||
expect(res.headers.get('content-type')).toBe('text/html');
|
||||
expect(res.headers.get('cache-control')).toBe('no-cache');
|
||||
const body = await res.text();
|
||||
expect(body).toContain('Flynn');
|
||||
});
|
||||
@@ -308,6 +309,16 @@ describe('GatewayServer integration', () => {
|
||||
expect(res.headers.get('content-type')).toBe('text/css');
|
||||
});
|
||||
|
||||
it('serves sw.js with no-store cache policy', async () => {
|
||||
if (!LISTEN_ALLOWED) {
|
||||
return;
|
||||
}
|
||||
const res = await fetch(`http://127.0.0.1:${TEST_PORT}/sw.js`);
|
||||
expect(res.status).toBe(200);
|
||||
expect(res.headers.get('content-type')).toBe('application/javascript');
|
||||
expect(res.headers.get('cache-control')).toBe('no-store');
|
||||
});
|
||||
|
||||
it('returns 404 for unknown HTTP path', async () => {
|
||||
if (!LISTEN_ALLOWED) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user