@yuantest/playwright - v1.0.5
    正在准备搜索索引...

    函数 validateTestConfig

    • 参数

      • config: unknown

      返回 SafeParseReturnType<
          {
              version: string;
              testDir: string;
              outputDir?: string;
              baseURL?: string;
              retries?: number;
              timeout?: number;
              workers?: number;
              shards?: number;
              reporters?: string[];
              browsers?: ("chromium" | "firefox" | "webkit")[];
              headers?: Record<string, string>;
              flakyThreshold?: number;
              isolateFlaky?: boolean;
              traces?: {
                  enabled?: boolean;
                  mode?: "off" | "on" | "retain-on-failure" | "on-first-retry";
                  screenshots?: boolean;
                  snapshots?: boolean;
                  sources?: boolean;
                  attachments?: boolean;
                  outputDir?: string;
              };
              artifacts?: {
                  enabled?: boolean;
                  screenshots?: "off"
                  | "on"
                  | "only-on-failure";
                  videos?: "off" | "on" | "retain-on-failure" | "on-first-retry";
                  downloads?: boolean;
                  outputDir?: string;
                  maxFileSize?: number;
              };
              visualTesting?: {
                  enabled?: boolean;
                  threshold?: number;
                  maxDiffPixelRatio?: number;
                  maxDiffPixels?: number;
                  updateSnapshots?: boolean;
                  compareWith?: string;
                  outputDir?: string;
              };
              annotations?: {
                  enabled?: boolean;
                  respectSkip?: boolean;
                  respectOnly?: boolean;
                  respectFail?: boolean;
                  respectSlow?: boolean;
                  respectFixme?: boolean;
                  customAnnotations?: Record<
                      string,
                      { action: "skip"
                      | "fail"
                      | "slow"
                      | "mark" },
                  >;
              };
              tags?: {
                  enabled?: boolean;
                  include?: string[];
                  exclude?: string[];
                  require?: string[];
              };
              htmlReport?: boolean;
              htmlReportDir?: string;
              testMatch?: string[];
              testIgnore?: string[];
              ignoreDirs?: string[];
              quarantine?: {
                  enabled?: boolean;
                  threshold?: number;
                  autoQuarantine?: boolean;
              };
          },
          {
              version: string;
              testDir: string;
              outputDir: string;
              baseURL?: string;
              retries: number;
              timeout: number;
              workers: number;
              shards: number;
              reporters?: string[];
              browsers: ("chromium" | "firefox" | "webkit")[];
              headers?: Record<string, string>;
              flakyThreshold: number;
              isolateFlaky: boolean;
              traces?: {
                  enabled: boolean;
                  mode: "off" | "on" | "retain-on-failure" | "on-first-retry";
                  screenshots: boolean;
                  snapshots: boolean;
                  sources: boolean;
                  attachments: boolean;
                  outputDir?: string;
              };
              artifacts?: {
                  enabled: boolean;
                  screenshots: "off"
                  | "on"
                  | "only-on-failure";
                  videos: "off" | "on" | "retain-on-failure" | "on-first-retry";
                  downloads?: boolean;
                  outputDir?: string;
                  maxFileSize?: number;
              };
              visualTesting?: {
                  enabled: boolean;
                  threshold: number;
                  maxDiffPixelRatio: number;
                  maxDiffPixels: number;
                  updateSnapshots: boolean;
                  compareWith?: string;
                  outputDir?: string;
              };
              annotations?: {
                  enabled: boolean;
                  respectSkip: boolean;
                  respectOnly: boolean;
                  respectFail: boolean;
                  respectSlow: boolean;
                  respectFixme: boolean;
                  customAnnotations?: Record<
                      string,
                      { action: "skip"
                      | "fail"
                      | "slow"
                      | "mark" },
                  >;
              };
              tags?: {
                  enabled: boolean;
                  include?: string[];
                  exclude?: string[];
                  require?: string[];
              };
              htmlReport: boolean;
              htmlReportDir?: string;
              testMatch?: string[];
              testIgnore?: string[];
              ignoreDirs: string[];
              quarantine?: {
                  enabled: boolean;
                  threshold: number;
                  autoQuarantine: boolean;
              };
          },
      >