Skip to content

Commit f9ea416

Browse files
committed
refactor(test): update inline projects example
1 parent 78972cb commit f9ea416

9 files changed

Lines changed: 49 additions & 30 deletions

File tree

examples/rstest-inline-projects/rstack.config.ts

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

examples/rstest-inline-projects/package.json renamed to examples/test-inline-projects/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@examples/rstest-inline-projects",
2+
"name": "@examples/test-inline-projects",
33
"private": true,
44
"type": "module",
55
"scripts": {
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// Rstack configuration guide: https://rstack.rs/config
2+
import { define } from 'rstack';
3+
4+
define.app(async () => {
5+
const { pluginReact } = await import('@rsbuild/plugin-react');
6+
return {
7+
plugins: [pluginReact()],
8+
};
9+
});
10+
11+
define.test(async () => {
12+
const { defineInlineProject } = await import('rstack/test');
13+
return {
14+
projects: [
15+
defineInlineProject({
16+
name: 'ssr',
17+
include: ['./tests/ssr.test.tsx'],
18+
testEnvironment: 'node',
19+
}),
20+
defineInlineProject({
21+
name: 'dom',
22+
include: ['./tests/dom.test.tsx'],
23+
testEnvironment: 'happy-dom',
24+
}),
25+
],
26+
};
27+
});
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

pnpm-lock.yaml

Lines changed: 21 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)