Skip to content

Commit c8a8792

Browse files
committed
docs: remove duplicate testing guidance
1 parent 5a840bb commit c8a8792

3 files changed

Lines changed: 1 addition & 154 deletions

File tree

README.md

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -113,54 +113,6 @@ For example, import Rstest APIs without adding `@rstest/core` as a direct depend
113113
import { expect, test } from 'rstack/test';
114114
```
115115

116-
## Test projects
117-
118-
`define.test()` accepts an Rstest configuration. For a single project, Rstack automatically applies the `define.app()` configuration, or falls back to `define.lib()`:
119-
120-
```ts
121-
import { define } from 'rstack';
122-
123-
define.app({
124-
// Rsbuild configuration
125-
});
126-
127-
define.test({
128-
testEnvironment: 'happy-dom',
129-
});
130-
```
131-
132-
For multiple test environments in the same app or library, use inline projects:
133-
134-
```ts
135-
import { define } from 'rstack';
136-
import { defineInlineProject } from 'rstack/test';
137-
138-
define.app({
139-
// Shared by all inline projects
140-
});
141-
142-
define.test({
143-
projects: [
144-
defineInlineProject({
145-
name: 'node',
146-
include: ['./tests/node/**/*.test.ts'],
147-
testEnvironment: 'node',
148-
}),
149-
defineInlineProject({
150-
name: 'dom',
151-
include: ['./tests/dom/**/*.test.tsx'],
152-
testEnvironment: 'happy-dom',
153-
}),
154-
],
155-
});
156-
```
157-
158-
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.
159-
160-
Run all projects with `rs test`, or select one with `rs test --project dom`.
161-
162-
See [`examples/rstest-inline-projects`](./examples/rstest-inline-projects) for a complete React SSR example.
163-
164116
## Credits
165117

166118
Rstack CLI is inspired by:
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
["index", "commands", "testing"]
1+
["index", "commands"]

examples/documentation/docs/api/testing.mdx

Lines changed: 0 additions & 105 deletions
This file was deleted.

0 commit comments

Comments
 (0)