Skip to content

Dark theme added with other style changes#163

Open
mrkhan wants to merge 5 commits intomainfrom
fix/scale-down-style
Open

Dark theme added with other style changes#163
mrkhan wants to merge 5 commits intomainfrom
fix/scale-down-style

Conversation

@mrkhan
Copy link
Copy Markdown
Member

@mrkhan mrkhan commented Apr 27, 2026

Dark theme added with other style changes. resolves #162

mrkhan added 5 commits April 27, 2026 16:55
Root cause: The ThemeService calls window.matchMedia(...) as a class field initializer (line 20 of theme.service.ts), which runs
  immediately when the service is instantiated. jsdom (the test environment) doesn't implement window.matchMedia, so every test that
  touched Angular's DI tree — including all tests where ThemeService was auto-provided via providedIn: 'root' — crashed with TypeError:
  window.matchMedia is not a function.
  Fix:
  1. Created src/setup-tests.ts — a global test setup file that defines a minimal window.matchMedia stub.
  2. Registered it via setupFiles in angular.json's test options so the @angular/build:unit-test builder picks it up before any spec runs
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
77.6% Coverage on New Code (required ≥ 80%)
B Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add dark theme

1 participant