close
logo
Rstest
指南
配置
API
English
简体中文
指南
配置
API
English
简体中文
logo
Rstest
Overview

Test Configurations

root
name
include
exclude
setupFiles
projects
update
globals
passWithNoTests
includeSource
testNamePattern
env
bail
retry
testTimeout
hookTimeout
maxConcurrency
pool
isolate
testEnvironment
clearMocks
resetMocks
restoreMocks
unstubEnvs
unstubGlobals
coverage
reporters
logHeapUsage
hideSkippedTests
slowTestThreshold
snapshotFormat
chaiConfig
resolveSnapshotPath
printConsoleTrace
onConsoleLog
disableConsoleIntercept

Build Configurations

plugins
source
output
resolve
tools
dev
performance
📝 在 GitHub 上编辑此页
上一页snapshotFormat
下一页resolveSnapshotPath

#chaiConfig

  • 类型:
type ChaiConfig = {
  /**
   * @default false
   */
  includeStack: boolean;
  /**
   * @default true
   */
  showDiff: boolean;
  /**
   * @default 40
   */
  truncateThreshold: number;
};
  • 默认值: undefined

自定义 Chai config。

rstest.config.ts
import { defineConfig } from '@rstest/core';

export default defineConfig({
  chaiConfig: {
    truncateThreshold: 100,
  },
});