From 5a840bb829b9fc1b24573311bf189008d6754ff3 Mon Sep 17 00:00:00 2001 From: neverland Date: Tue, 21 Jul 2026 20:50:16 +0800 Subject: [PATCH 1/5] docs: add testing guide --- website/docs/en/guide/_meta.json | 9 ++ website/docs/en/guide/api-reference.mdx | 2 + website/docs/en/guide/cli/test.mdx | 2 + website/docs/en/guide/configuration.mdx | 2 + website/docs/en/guide/testing.mdx | 125 ++++++++++++++++++++++++ website/docs/zh/guide/_meta.json | 9 ++ website/docs/zh/guide/api-reference.mdx | 2 + website/docs/zh/guide/cli/test.mdx | 2 + website/docs/zh/guide/configuration.mdx | 2 + website/docs/zh/guide/testing.mdx | 125 ++++++++++++++++++++++++ 10 files changed, 280 insertions(+) create mode 100644 website/docs/en/guide/testing.mdx create mode 100644 website/docs/zh/guide/testing.mdx diff --git a/website/docs/en/guide/_meta.json b/website/docs/en/guide/_meta.json index e98eb45..e5f7e3a 100644 --- a/website/docs/en/guide/_meta.json +++ b/website/docs/en/guide/_meta.json @@ -18,6 +18,15 @@ "name": "api-reference", "label": "API reference" }, + { + "type": "section-header", + "label": "Practices" + }, + { + "type": "file", + "name": "testing", + "label": "Testing" + }, { "type": "dir-section-header", "name": "cli", diff --git a/website/docs/en/guide/api-reference.mdx b/website/docs/en/guide/api-reference.mdx index a046d6c..ed5ecd1 100644 --- a/website/docs/en/guide/api-reference.mdx +++ b/website/docs/en/guide/api-reference.mdx @@ -55,6 +55,8 @@ import { describe, expect, test } from 'rstack/test'; See the [Rstest runtime API](https://rstest.rs/api/runtime-api/) for test APIs and the [Rstest core APIs](https://rstest.rs/api/javascript-api/rstest-core) for configuration helpers. +For project configuration examples, see [Testing](./testing). + ### `rstack/lint` `rstack/lint` re-exports all public APIs from `@rslint/core`, including JavaScript and TypeScript presets and framework plugins. diff --git a/website/docs/en/guide/cli/test.mdx b/website/docs/en/guide/cli/test.mdx index 4ee9e32..31134d4 100644 --- a/website/docs/en/guide/cli/test.mdx +++ b/website/docs/en/guide/cli/test.mdx @@ -85,3 +85,5 @@ define.test({ testEnvironment: 'happy-dom', }); ``` + +For project configuration and inheritance behavior, see [Testing](../testing). diff --git a/website/docs/en/guide/configuration.mdx b/website/docs/en/guide/configuration.mdx index 134b1a1..ca3f0d1 100644 --- a/website/docs/en/guide/configuration.mdx +++ b/website/docs/en/guide/configuration.mdx @@ -144,6 +144,8 @@ When `extends` is omitted, Rstack automatically connects the test configuration If the root test configuration does not define `extends` and contains `projects`, Rstack applies automatic inheritance to each inline project that omits its own `extends`. A function-based application or library configuration is resolved once and shared by those projects. String project entries are passed to Rstest unchanged; they load their external configurations independently and do not inherit the current application or library configuration. +For single- and multi-project examples, see [Testing](./testing). + ### `define.lint()` \{#define-lint} Defines the [Rslint configuration](https://rslint.rs/config/). Pass the configuration directly, or use an async function to load presets and plugins from `rstack/lint` on demand. diff --git a/website/docs/en/guide/testing.mdx b/website/docs/en/guide/testing.mdx new file mode 100644 index 0000000..39e494b --- /dev/null +++ b/website/docs/en/guide/testing.mdx @@ -0,0 +1,125 @@ +# Testing + +Rstack uses [Rstest](https://rstest.rs/) to run tests. + +```bash +rs test +``` + +For command-line options and subcommands, see [`rs test`](./cli/test). + +## Configure tests + +Register an Rstest configuration with [`define.test()`](./configuration#define-test). It accepts the same configuration as Rstest's `defineConfig()`: + +```ts title="rstack.config.ts" +import { define } from 'rstack'; + +define.test({ + testEnvironment: 'node', +}); +``` + +## Test APIs + +Import test APIs and configuration helpers from [`rstack/test`](./api-reference#rstacktest): + +```ts +import { defineInlineProject, expect, test } from 'rstack/test'; +``` + +## Single project + +For a single test project, pass the Rstest options directly to `define.test()`: + +```ts title="rstack.config.ts" +import { define } from 'rstack'; + +define.app({ + // Shared application configuration +}); + +define.test({ + testEnvironment: 'happy-dom', +}); +``` + +When `extends` is omitted, Rstack uses the Rsbuild adapter to extend the test configuration from `define.app()`. If no application configuration is defined, it uses the Rslib adapter with `define.lib()` instead. `define.app()` takes precedence when both are defined. + +## Multiple projects + +Set Rstest's [`projects`](https://rstest.rs/config/test/projects) option to run multiple test configurations together. Entries can be inline projects or strings that Rstest resolves as external projects. + +### Inline projects + +Use inline projects when different test environments should share the current application or library configuration: + +```ts title="rstack.config.ts" +import { define } from 'rstack'; +import { defineInlineProject } from 'rstack/test'; + +define.app({ + // Shared by both inline projects +}); + +define.test({ + projects: [ + defineInlineProject({ + name: 'node', + include: ['./tests/node/**/*.test.ts'], + testEnvironment: 'node', + }), + defineInlineProject({ + name: 'dom', + include: ['./tests/dom/**/*.test.tsx'], + testEnvironment: 'happy-dom', + }), + ], +}); +``` + +Rstack applies the corresponding adapter to each inline project that omits `extends`. A function-based `define.app()` or `define.lib()` configuration is resolved once, then shared by those inline projects. + +Run one project by name: + +```bash +rs test --project dom +``` + +See [`examples/rstest-inline-projects`](https://github.com/rstackjs/rstack-cli/tree/main/examples/rstest-inline-projects) for a complete React SSR example using Node.js and happy-dom. + +### External projects + +Use a string entry for an externally configured project: + +```ts title="rstack.config.ts" +import { define } from 'rstack'; + +define.test({ + projects: ['./legacy/rstest.config.ts'], +}); +``` + +Rstack passes string entries to Rstest unchanged. External projects load their own configuration and do not inherit the current `define.app()` or `define.lib()` configuration. Use external projects when each project manages its configuration independently. + +## Customize inheritance + +Set Rstest's [`extends`](https://rstest.rs/config/test/extends) option explicitly when a project should not inherit the current application or library configuration: + +```ts title="rstack.config.ts" +import { define } from 'rstack'; +import { defineInlineProject } from 'rstack/test'; + +define.test({ + projects: [ + defineInlineProject({ + name: 'standalone', + extends: { + testEnvironment: 'node', + }, + }), + ], +}); +``` + +Setting `extends` on an inline project disables automatic inheritance only for that project. Setting it on the root `define.test()` configuration disables automatic inheritance for the entire test configuration. diff --git a/website/docs/zh/guide/_meta.json b/website/docs/zh/guide/_meta.json index 2af2d79..c547cc0 100644 --- a/website/docs/zh/guide/_meta.json +++ b/website/docs/zh/guide/_meta.json @@ -18,6 +18,15 @@ "name": "api-reference", "label": "API 参考" }, + { + "type": "section-header", + "label": "实践" + }, + { + "type": "file", + "name": "testing", + "label": "测试" + }, { "type": "dir-section-header", "name": "cli", diff --git a/website/docs/zh/guide/api-reference.mdx b/website/docs/zh/guide/api-reference.mdx index 281eca1..ae162e5 100644 --- a/website/docs/zh/guide/api-reference.mdx +++ b/website/docs/zh/guide/api-reference.mdx @@ -55,6 +55,8 @@ import { describe, expect, test } from 'rstack/test'; 测试 API 请参阅 [Rstest 运行时 API](https://rstest.rs/zh/api/runtime-api/),配置辅助 API 请参阅 [Rstest 核心 API](https://rstest.rs/zh/api/javascript-api/rstest-core)。 +测试项目的配置示例请参阅[测试](./testing)。 + ### `rstack/lint` `rstack/lint` 重导出 `@rslint/core` 的全部公开 API,包括 JavaScript 和 TypeScript 预设以及框架插件。 diff --git a/website/docs/zh/guide/cli/test.mdx b/website/docs/zh/guide/cli/test.mdx index bf5db67..7db1fa8 100644 --- a/website/docs/zh/guide/cli/test.mdx +++ b/website/docs/zh/guide/cli/test.mdx @@ -85,3 +85,5 @@ define.test({ testEnvironment: 'happy-dom', }); ``` + +测试项目的配置与继承规则请参阅[测试](../testing)。 diff --git a/website/docs/zh/guide/configuration.mdx b/website/docs/zh/guide/configuration.mdx index 9a6ada1..1a13f96 100644 --- a/website/docs/zh/guide/configuration.mdx +++ b/website/docs/zh/guide/configuration.mdx @@ -144,6 +144,8 @@ define.test({ 如果测试根配置未定义 `extends` 且包含 `projects`,Rstack 会为每个未自行设置 `extends` 的内联项目应用自动继承。函数形式的应用或库配置只会解析一次,并由这些项目共享。字符串形式的项目会原样传给 Rstest;它们会独立加载外部配置,不继承当前应用或库的配置。 +单项目和多项目示例请参阅[测试](./testing)。 + ### `define.lint()` \{#define-lint} 定义 [Rslint 配置](https://rslint.rs/config/)。可以直接传入配置,也可以使用异步函数,按需从 `rstack/lint` 加载预设和插件。 diff --git a/website/docs/zh/guide/testing.mdx b/website/docs/zh/guide/testing.mdx new file mode 100644 index 0000000..ed89dc7 --- /dev/null +++ b/website/docs/zh/guide/testing.mdx @@ -0,0 +1,125 @@ +# 测试 \{#testing} + +Rstack 使用 [Rstest](https://rstest.rs/zh/) 运行测试。 + +```bash +rs test +``` + +命令行选项和子命令请参阅 [`rs test`](./cli/test)。 + +## 配置测试 \{#configure-tests} + +通过 [`define.test()`](./configuration#define-test) 注册 Rstest 配置,其用法与将配置传给 Rstest 的 `defineConfig()` 一致: + +```ts title="rstack.config.ts" +import { define } from 'rstack'; + +define.test({ + testEnvironment: 'node', +}); +``` + +## 测试 API \{#test-apis} + +测试 API 和配置辅助函数可从 [`rstack/test`](./api-reference#rstacktest) 导入: + +```ts +import { defineInlineProject, expect, test } from 'rstack/test'; +``` + +## 单项目 \{#single-project} + +对于单个测试项目,直接将 Rstest 选项传给 `define.test()`: + +```ts title="rstack.config.ts" +import { define } from 'rstack'; + +define.app({ + // 共享的应用配置 +}); + +define.test({ + testEnvironment: 'happy-dom', +}); +``` + +未设置 `extends` 时,Rstack 会通过 Rsbuild 适配器让测试配置继承 `define.app()`。如果没有应用配置,则通过 Rslib 适配器回退到 `define.lib()`。同时定义两者时,`define.app()` 的优先级更高。 + +## 多项目 \{#multiple-projects} + +通过 Rstest 的 [`projects`](https://rstest.rs/zh/config/test/projects) 选项可以同时运行多套测试配置。每一项既可以是内联项目,也可以是由 Rstest 解析为外部项目的字符串。 + +### 内联项目 \{#inline-projects} + +不同测试环境需要共享当前应用或库配置时,请使用内联项目: + +```ts title="rstack.config.ts" +import { define } from 'rstack'; +import { defineInlineProject } from 'rstack/test'; + +define.app({ + // 由两个内联项目共享 +}); + +define.test({ + projects: [ + defineInlineProject({ + name: 'node', + include: ['./tests/node/**/*.test.ts'], + testEnvironment: 'node', + }), + defineInlineProject({ + name: 'dom', + include: ['./tests/dom/**/*.test.tsx'], + testEnvironment: 'happy-dom', + }), + ], +}); +``` + +Rstack 会将对应的适配器应用到每个未设置 `extends` 的内联项目。函数形式的 `define.app()` 或 `define.lib()` 配置只会解析一次,再由这些内联项目共享。 + +按项目名称运行单个项目: + +```bash +rs test --project dom +``` + +完整的 React SSR 示例请参阅 [`examples/rstest-inline-projects`](https://github.com/rstackjs/rstack-cli/tree/main/examples/rstest-inline-projects),该示例使用 Node.js 和 happy-dom 两种测试环境。 + +### 外部项目 \{#external-projects} + +使用字符串形式的配置项加载外部项目: + +```ts title="rstack.config.ts" +import { define } from 'rstack'; + +define.test({ + projects: ['./legacy/rstest.config.ts'], +}); +``` + +Rstack 会将字符串形式的项目原样传给 Rstest。外部项目会加载自己的配置,不会继承当前的 `define.app()` 或 `define.lib()` 配置。每个项目需要独立管理配置时,请使用外部项目。 + +## 自定义继承 \{#customize-inheritance} + +项目不应继承当前应用或库配置时,请显式设置 Rstest 的 [`extends`](https://rstest.rs/zh/config/test/extends) 选项: + +```ts title="rstack.config.ts" +import { define } from 'rstack'; +import { defineInlineProject } from 'rstack/test'; + +define.test({ + projects: [ + defineInlineProject({ + name: 'standalone', + extends: { + testEnvironment: 'node', + }, + }), + ], +}); +``` + +在内联项目中设置 `extends`,只会关闭当前项目的自动继承。在 `define.test()` 的根配置中设置该选项,则会关闭整个测试配置的自动继承。 From c8a8792064192081b8aaa97f8d3833856db668c5 Mon Sep 17 00:00:00 2001 From: neverland Date: Tue, 21 Jul 2026 20:53:04 +0800 Subject: [PATCH 2/5] docs: remove duplicate testing guidance --- README.md | 48 --------- examples/documentation/docs/api/_meta.json | 2 +- examples/documentation/docs/api/testing.mdx | 105 -------------------- 3 files changed, 1 insertion(+), 154 deletions(-) delete mode 100644 examples/documentation/docs/api/testing.mdx diff --git a/README.md b/README.md index caa6458..7284e37 100644 --- a/README.md +++ b/README.md @@ -113,54 +113,6 @@ For example, import Rstest APIs without adding `@rstest/core` as a direct depend import { expect, test } from 'rstack/test'; ``` -## Test projects - -`define.test()` accepts an Rstest configuration. For a single project, Rstack automatically applies the `define.app()` configuration, or falls back to `define.lib()`: - -```ts -import { define } from 'rstack'; - -define.app({ - // Rsbuild configuration -}); - -define.test({ - testEnvironment: 'happy-dom', -}); -``` - -For multiple test environments in the same app or library, use inline projects: - -```ts -import { define } from 'rstack'; -import { defineInlineProject } from 'rstack/test'; - -define.app({ - // Shared by all inline projects -}); - -define.test({ - projects: [ - defineInlineProject({ - name: 'node', - include: ['./tests/node/**/*.test.ts'], - testEnvironment: 'node', - }), - defineInlineProject({ - name: 'dom', - include: ['./tests/dom/**/*.test.tsx'], - testEnvironment: 'happy-dom', - }), - ], -}); -``` - -Rstack applies the shared app or library adapter to every inline project without an explicit `extends`. String project entries are passed to Rstest unchanged and load their own configuration. - -Run all projects with `rs test`, or select one with `rs test --project dom`. - -See [`examples/rstest-inline-projects`](./examples/rstest-inline-projects) for a complete React SSR example. - ## Credits Rstack CLI is inspired by: diff --git a/examples/documentation/docs/api/_meta.json b/examples/documentation/docs/api/_meta.json index 3e97dca..f0ff0de 100644 --- a/examples/documentation/docs/api/_meta.json +++ b/examples/documentation/docs/api/_meta.json @@ -1 +1 @@ -["index", "commands", "testing"] +["index", "commands"] diff --git a/examples/documentation/docs/api/testing.mdx b/examples/documentation/docs/api/testing.mdx deleted file mode 100644 index 99e64aa..0000000 --- a/examples/documentation/docs/api/testing.mdx +++ /dev/null @@ -1,105 +0,0 @@ -# Testing - -Rstack uses [Rstest](https://rstest.rs/) for testing. The value passed to `define.test()` is an Rstest configuration, similar to using Rstest's `defineConfig()` directly. - -Test APIs and configuration helpers are available from `rstack/test`: - -```ts -import { defineInlineProject, expect, test } from 'rstack/test'; -``` - -## Single project - -For a single test project, pass the Rstest options directly: - -```ts title="rstack.config.ts" -import { define } from 'rstack'; - -define.app({ - // Rsbuild configuration -}); - -define.test({ - testEnvironment: 'happy-dom', - setupFiles: ['./tests/rstest.setup.ts'], -}); -``` - -Unless `extends` is provided explicitly, Rstack automatically extends the test configuration from `define.app()`. If there is no app configuration, it falls back to `define.lib()`. - -## Inline projects - -Use Rstest inline projects when one app or library needs multiple test configurations, such as separate Node.js and DOM test environments: - -```ts title="rstack.config.ts" -import { define } from 'rstack'; -import { defineInlineProject } from 'rstack/test'; - -define.app({ - // Shared by both inline projects -}); - -define.test({ - coverage: { - enabled: true, - }, - projects: [ - defineInlineProject({ - name: 'node', - include: ['./tests/node/**/*.test.ts'], - testEnvironment: 'node', - }), - defineInlineProject({ - name: 'dom', - include: ['./tests/dom/**/*.test.tsx'], - testEnvironment: 'happy-dom', - setupFiles: ['./tests/rstest.setup.ts'], - }), - ], -}); -``` - -Rstack applies the shared `define.app()` or `define.lib()` adapter to every inline project that does not define its own `extends`. Function-based app or library configuration is resolved once and shared by all inline projects. - -Run all projects: - -```bash -rs test -``` - -Run one project by name: - -```bash -rs test --project dom -``` - -See [`examples/rstest-inline-projects`](https://github.com/rstackjs/rstack-cli/tree/main/examples/rstest-inline-projects) for a complete example that tests React server rendering in Node.js and client rendering in happy-dom. - -## Custom `extends` - -An inline project can opt out of automatic app or library inheritance by providing `extends` explicitly: - -```ts -import { defineInlineProject } from 'rstack/test'; - -const customProject = defineInlineProject({ - name: 'custom', - extends: customAdapter(), -}); -``` - -If the root `define.test()` configuration provides `extends`, Rstack leaves the complete test configuration unchanged. - -## External projects - -String project entries are passed to Rstest unchanged: - -```ts -import { define } from 'rstack'; - -define.test({ - projects: ['./legacy/rstest.config.ts'], -}); -``` - -External string projects load their own Rstest configuration and do not inherit the current `define.app()` or `define.lib()` configuration. Use inline projects when projects should share the current Rstack build configuration. From 9ee09f2e1575fe1a4e8560ec3691c0025942cdcd Mon Sep 17 00:00:00 2001 From: neverland Date: Tue, 21 Jul 2026 20:55:21 +0800 Subject: [PATCH 3/5] docs: surface testing guide in CLI reference --- website/docs/en/guide/cli/test.mdx | 4 ++-- website/docs/zh/guide/cli/test.mdx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/website/docs/en/guide/cli/test.mdx b/website/docs/en/guide/cli/test.mdx index 31134d4..b31f70a 100644 --- a/website/docs/en/guide/cli/test.mdx +++ b/website/docs/en/guide/cli/test.mdx @@ -2,6 +2,8 @@ The `rs test` command uses [Rstest](https://rstest.rs/guide/basic/cli) to run tests. +For details about configuring test projects and how configuration inheritance works, see [Testing](../testing). + ## Usage ```bash @@ -85,5 +87,3 @@ define.test({ testEnvironment: 'happy-dom', }); ``` - -For project configuration and inheritance behavior, see [Testing](../testing). diff --git a/website/docs/zh/guide/cli/test.mdx b/website/docs/zh/guide/cli/test.mdx index 7db1fa8..95d3cb2 100644 --- a/website/docs/zh/guide/cli/test.mdx +++ b/website/docs/zh/guide/cli/test.mdx @@ -2,6 +2,8 @@ `rs test` 命令使用 [Rstest](https://rstest.rs/zh/guide/basic/cli) 运行测试。 +有关测试项目的配置方式和继承机制,请参阅[测试](../testing)。 + ## 用法 \{#usage} ```bash @@ -85,5 +87,3 @@ define.test({ testEnvironment: 'happy-dom', }); ``` - -测试项目的配置与继承规则请参阅[测试](../testing)。 From f3eae200fc8eec5535883434471883e25a64628b Mon Sep 17 00:00:00 2001 From: neverland Date: Tue, 21 Jul 2026 20:57:10 +0800 Subject: [PATCH 4/5] docs: generalize testing guide link --- website/docs/en/guide/cli/test.mdx | 2 +- website/docs/zh/guide/cli/test.mdx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/en/guide/cli/test.mdx b/website/docs/en/guide/cli/test.mdx index b31f70a..c1e393f 100644 --- a/website/docs/en/guide/cli/test.mdx +++ b/website/docs/en/guide/cli/test.mdx @@ -2,7 +2,7 @@ The `rs test` command uses [Rstest](https://rstest.rs/guide/basic/cli) to run tests. -For details about configuring test projects and how configuration inheritance works, see [Testing](../testing). +For more guidance on testing, see [Testing](../testing). ## Usage diff --git a/website/docs/zh/guide/cli/test.mdx b/website/docs/zh/guide/cli/test.mdx index 95d3cb2..469eae7 100644 --- a/website/docs/zh/guide/cli/test.mdx +++ b/website/docs/zh/guide/cli/test.mdx @@ -2,7 +2,7 @@ `rs test` 命令使用 [Rstest](https://rstest.rs/zh/guide/basic/cli) 运行测试。 -有关测试项目的配置方式和继承机制,请参阅[测试](../testing)。 +如需了解更多测试相关用法,请参阅[测试](../testing)。 ## 用法 \{#usage} From 2e4f75f34e432491d3a796f9e3e61743bf16da6e Mon Sep 17 00:00:00 2001 From: neverland Date: Tue, 21 Jul 2026 21:00:16 +0800 Subject: [PATCH 5/5] docs: generalize testing guide callouts --- website/docs/en/guide/api-reference.mdx | 2 +- website/docs/en/guide/configuration.mdx | 2 +- website/docs/zh/guide/api-reference.mdx | 2 +- website/docs/zh/guide/configuration.mdx | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/website/docs/en/guide/api-reference.mdx b/website/docs/en/guide/api-reference.mdx index ed5ecd1..a94dcbb 100644 --- a/website/docs/en/guide/api-reference.mdx +++ b/website/docs/en/guide/api-reference.mdx @@ -55,7 +55,7 @@ import { describe, expect, test } from 'rstack/test'; See the [Rstest runtime API](https://rstest.rs/api/runtime-api/) for test APIs and the [Rstest core APIs](https://rstest.rs/api/javascript-api/rstest-core) for configuration helpers. -For project configuration examples, see [Testing](./testing). +> For more guidance on testing, see [Testing](./testing). ### `rstack/lint` diff --git a/website/docs/en/guide/configuration.mdx b/website/docs/en/guide/configuration.mdx index ca3f0d1..d94fac3 100644 --- a/website/docs/en/guide/configuration.mdx +++ b/website/docs/en/guide/configuration.mdx @@ -144,7 +144,7 @@ When `extends` is omitted, Rstack automatically connects the test configuration If the root test configuration does not define `extends` and contains `projects`, Rstack applies automatic inheritance to each inline project that omits its own `extends`. A function-based application or library configuration is resolved once and shared by those projects. String project entries are passed to Rstest unchanged; they load their external configurations independently and do not inherit the current application or library configuration. -For single- and multi-project examples, see [Testing](./testing). +> For more guidance on testing, see [Testing](./testing). ### `define.lint()` \{#define-lint} diff --git a/website/docs/zh/guide/api-reference.mdx b/website/docs/zh/guide/api-reference.mdx index ae162e5..af26fea 100644 --- a/website/docs/zh/guide/api-reference.mdx +++ b/website/docs/zh/guide/api-reference.mdx @@ -55,7 +55,7 @@ import { describe, expect, test } from 'rstack/test'; 测试 API 请参阅 [Rstest 运行时 API](https://rstest.rs/zh/api/runtime-api/),配置辅助 API 请参阅 [Rstest 核心 API](https://rstest.rs/zh/api/javascript-api/rstest-core)。 -测试项目的配置示例请参阅[测试](./testing)。 +> 如需了解更多测试相关用法,请参阅[测试](./testing)。 ### `rstack/lint` diff --git a/website/docs/zh/guide/configuration.mdx b/website/docs/zh/guide/configuration.mdx index 1a13f96..c77694e 100644 --- a/website/docs/zh/guide/configuration.mdx +++ b/website/docs/zh/guide/configuration.mdx @@ -144,7 +144,7 @@ define.test({ 如果测试根配置未定义 `extends` 且包含 `projects`,Rstack 会为每个未自行设置 `extends` 的内联项目应用自动继承。函数形式的应用或库配置只会解析一次,并由这些项目共享。字符串形式的项目会原样传给 Rstest;它们会独立加载外部配置,不继承当前应用或库的配置。 -单项目和多项目示例请参阅[测试](./testing)。 +> 如需了解更多测试相关用法,请参阅[测试](./testing)。 ### `define.lint()` \{#define-lint}