Files
TimeTracker/tests/test_service_worker.py
Dries Peeters 90dde470da style: standardize code formatting and normalize line endings
- Normalize line endings from CRLF to LF across all files to match .editorconfig
- Standardize quote style from single quotes to double quotes
- Normalize whitespace and formatting throughout codebase
- Apply consistent code style across 372 files including:
  * Application code (models, routes, services, utils)
  * Test files
  * Configuration files
  * CI/CD workflows

This ensures consistency with the project's .editorconfig settings and
improves code maintainability.
2025-11-28 20:05:37 +01:00

14 lines
479 B
Python

import re
def test_service_worker_serves_assets(client):
resp = client.get("/service-worker.js")
assert resp.status_code == 200
text = resp.get_data(as_text=True)
# Ensure JS content type and presence of cache list with known asset
assert "application/javascript" in (resp.headers.get("Content-Type") or "")
assert "dist/output.css" in text
assert "enhanced-ui.js" in text
# Basic sanity: ASSETS array present
assert "const ASSETS=" in text