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

Test Configurations

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

Build Configurations

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

#name

  • 类型: string
  • 默认值: rstest

测试项目的名称。

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

export default defineConfig({
  name: 'node',
});

当你通过 projects 定义多个测试项目时,建议为每个项目指定唯一的名称,方便通过 --project 选项来过滤运行特定项目。

如果 project 未提供名称,Rstest 将会使用当前项目的 package.json 中定义的 name 属性,如果不存在,则使用文件夹名称。