Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

876 B
Raw Blame
import { describe, expect, it } from 'vitest';

import { resolveStartupSplashHandoff } from '../startupSplashContinuity';

describe('startup splash continuity', () => {
  it.each([
    ['light', 'light', 'light'],
    ['light', 'dark', 'light'],
    ['passthrough', 'light', 'light'],
    ['passthrough', 'dark', 'dark'],
  ] as const)(
    '首启门 %s + 系统 %s → JS 舞台 %s',
    (gate, systemTheme, targetTheme) => {
      expect(resolveStartupSplashHandoff(gate, systemTheme)).toEqual({
        showNativeBridge: false,
        targetTheme,
      });
    },
  );

  it.each(['light', 'dark'] as const)(
    '首启门 pending + 系统 %s 时保留原生品牌帧且不猜主题',
    (systemTheme) => {
      expect(resolveStartupSplashHandoff('pending', systemTheme)).toEqual({
        showNativeBridge: true,
        targetTheme: null,
      });
    },
  );
});