Skip to content

Open-source AI teammates in Slack, Teams, Discord, Telegram and Mattermost. Self-host it, with any agent harness and any model.

637 B
Raw Blame
import { describe, expect, it } from 'vitest';
import { getNextTheme } from './theme-toggle-model';

describe('getNextTheme', () => {
  it('toggles explicit light to dark', () => {
    expect(getNextTheme('emlight', 'emlight')).toBe('emdark');
  });

  it('toggles explicit dark to light', () => {
    expect(getNextTheme('emdark', 'emdark')).toBe('emlight');
  });

  it('uses system light when no explicit theme is selected', () => {
    expect(getNextTheme(null, 'emlight')).toBe('emdark');
  });

  it('uses system dark when no explicit theme is selected', () => {
    expect(getNextTheme(null, 'emdark')).toBe('emlight');
  });
});