For AI agents: the complete documentation index is available at https://rstest.rs/zh/llms.txt, the full documentation bundle is available at https://rstest.rs/zh/llms-full.txt, and this page is available as Markdown at https://rstest.rs/zh/config/test/name.md.
close
  • 简体中文
  • name

    • 类型: string
    • 默认值: 'rstest'(单项目),在 projects 中默认取 package.json 的 name 或目录名

    设置测试项目的名称,用于 reporter 输出展示以及通过 --project 过滤项目。

    rstest.config.ts
    import { defineConfig } from '@rstest/core';
    
    export default defineConfig({
      name: 'node',
    });

    通过 projects 定义的所有项目名称必须唯一;若存在重名,Rstest 会在启动时报错。

    当 projects 中的子项目未指定 name 时,Rstest 会读取该项目 package.json 中的 name 字段;若不存在,则使用其目录名。未配置 projects 的单项目运行时,默认为 'rstest'。