Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions examples/rstest-inline-projects/rstack.config.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@examples/rstest-inline-projects",
"name": "@examples/test-inline-projects",
"private": true,
"type": "module",
"scripts": {
Expand Down
27 changes: 27 additions & 0 deletions examples/test-inline-projects/rstack.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Rstack configuration guide: https://rstack.rs/config
import { define } from 'rstack';

define.app(async () => {
const { pluginReact } = await import('@rsbuild/plugin-react');
return {
plugins: [pluginReact()],
};
});

define.test(async () => {
const { defineInlineProject } = await import('rstack/test');
return {
projects: [
defineInlineProject({
name: 'ssr',
include: ['./tests/ssr.test.tsx'],
testEnvironment: 'node',
}),
defineInlineProject({
name: 'dom',
include: ['./tests/dom.test.tsx'],
testEnvironment: 'happy-dom',
}),
],
};
});
24 changes: 21 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion website/docs/en/guide/testing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Run one project by name:
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.
See [`examples/test-inline-projects`](https://github.com/rstackjs/rstack-cli/tree/main/examples/test-inline-projects) for a complete React SSR example using Node.js and happy-dom.

### External projects

Expand Down
2 changes: 1 addition & 1 deletion website/docs/zh/guide/testing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Rstack CLI 会将对应的适配器应用到每个未设置 `extends` 的内联
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 两种测试环境。
完整的 React SSR 示例请参阅 [`examples/test-inline-projects`](https://github.com/rstackjs/rstack-cli/tree/main/examples/test-inline-projects),该示例使用 Node.js 和 happy-dom 两种测试环境。

### 外部项目 \{#external-projects}

Expand Down