AiI18nVitestOptions

从 @ai-i18n/vite/vitest 导入:

import type { AiI18nVitestOptions } from '@ai-i18n/vite/vitest';

定义

type AiI18nVitestOptions = Pick<
  AiI18nOptions,
  | 'sourceLang'
  | 'defaultLang'
  | 'locales'
  | 'framework'
  | 'persist'
  | 'autoImport'
>;

字段

字段必填说明
sourceLang是测试源码使用的语言。
locales是Runtime 支持的语言列表。
defaultLang否没有有效持久化值时使用的初始语言。
framework否覆盖 Vanilla、Vue 或 React 的自动检测结果。
persist否测试 Runtime 的 localStorage 语言偏好配置。
autoImport否注入与生产框架模式相同的未绑定 Runtime API。

html、loading、cache、provider、directory、dts 等构建期字段不属于该类型。

完整字段契约见 AiI18nOptions。