import { TestBed } from '@angular/core/testing';

import { ThemeService } from './theme.service';
import { Router } from '@angular/router';

describe('ThemeService', () => {
  let service: ThemeService;

  const routerSpy = {
    navigate: jest.fn(),
    navigateByUrl: jest.fn(),
  };

  beforeEach(() => {
    TestBed.configureTestingModule({
      providers: [
        { provide: Router, useValue: routerSpy }, // <<— spy: neutralise la navigation
      ],
      imports: [],
    });
    service = TestBed.inject(ThemeService);
  });

  it('should be created', () => {
    expect(service).toBeTruthy();
  });
});
