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
3 changes: 3 additions & 0 deletions packages/create-rstack/template-app-react-js/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@
- `{{ packageManager }} run dev` - Start the development server
- `{{ packageManager }} run build` - Build the app for production
- `{{ packageManager }} run preview` - Preview the production build locally
- `{{ packageManager }} run test` - Run tests
- `{{ packageManager }} run test:watch` - Run tests in watch mode

## Docs

- Rsbuild: https://rsbuild.rs/llms.txt
- Rspack: https://rspack.rs/llms.txt
- Rstest: https://rstest.rs/llms.txt
7 changes: 6 additions & 1 deletion packages/create-rstack/template-app-react-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,19 @@
"format": "rs fmt",
"lint": "rs lint",
"preview": "rs preview",
"test": "rs test"
"test": "rs test",
"test:watch": "rs test --watch"
},
"dependencies": {
"react": "^19.2.8",
"react-dom": "^19.2.8"
},
"devDependencies": {
"@rsbuild/plugin-react": "^2.1.0",
"@testing-library/dom": "^10.4.1",
"@testing-library/jest-dom": "^7.0.0",
"@testing-library/react": "^16.3.2",
"happy-dom": "^20.11.1",
"rstack": "^0.3.5"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ define.app(async () => {
});

define.test({
// Configure Rstest
setupFiles: ['./tests/rstest.setup.js'],
});

define.lint(async () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { expect, test } from 'rstack/test';
import { render, screen } from '@testing-library/react';
import App from '../src/App';

test('renders the main page', () => {
render(<App />);
expect(screen.getByText('Rstack with React')).toBeInTheDocument();
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { expect } from 'rstack/test';
import * as jestDomMatchers from '@testing-library/jest-dom/matchers';

expect.extend(jestDomMatchers);
3 changes: 3 additions & 0 deletions packages/create-rstack/template-app-react-ts/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@
- `{{ packageManager }} run dev` - Start the development server
- `{{ packageManager }} run build` - Build the app for production
- `{{ packageManager }} run preview` - Preview the production build locally
- `{{ packageManager }} run test` - Run tests
- `{{ packageManager }} run test:watch` - Run tests in watch mode

## Docs

- Rsbuild: https://rsbuild.rs/llms.txt
- Rspack: https://rspack.rs/llms.txt
- Rstest: https://rstest.rs/llms.txt
7 changes: 6 additions & 1 deletion packages/create-rstack/template-app-react-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,22 @@
"format": "rs fmt",
"lint": "rs lint",
"preview": "rs preview",
"test": "rs test"
"test": "rs test",
"test:watch": "rs test --watch"
},
"dependencies": {
"react": "^19.2.8",
"react-dom": "^19.2.8"
},
"devDependencies": {
"@rsbuild/plugin-react": "^2.1.0",
"@testing-library/dom": "^10.4.1",
"@testing-library/jest-dom": "^7.0.0",
"@testing-library/react": "^16.3.2",
"@types/node": "^24.13.3",
"@types/react": "^19.2.18",
"@types/react-dom": "^19.2.4",
"happy-dom": "^20.11.1",
"rstack": "^0.3.5",
"typescript": "^7.0.2"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ define.app(async () => {
});

define.test({
// Configure Rstest
setupFiles: ['./tests/rstest.setup.ts'],
});

define.lint(async () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { expect, test } from 'rstack/test';
import { render, screen } from '@testing-library/react';
import App from '../src/App';

test('renders the main page', () => {
render(<App />);
expect(screen.getByText('Rstack with React')).toBeInTheDocument();
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { expect } from 'rstack/test';
import * as jestDomMatchers from '@testing-library/jest-dom/matchers';

expect.extend(jestDomMatchers);
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"types": ["rstack/types", "node", "@testing-library/jest-dom"]
},
"include": ["./"]
}
3 changes: 3 additions & 0 deletions packages/create-rstack/template-app-solid-js/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@
- `{{ packageManager }} run dev` - Start the development server
- `{{ packageManager }} run build` - Build the app for production
- `{{ packageManager }} run preview` - Preview the production build locally
- `{{ packageManager }} run test` - Run tests
- `{{ packageManager }} run test:watch` - Run tests in watch mode

## Docs

- Rsbuild: https://rsbuild.rs/llms.txt
- Rspack: https://rspack.rs/llms.txt
- Rstest: https://rstest.rs/llms.txt
6 changes: 5 additions & 1 deletion packages/create-rstack/template-app-solid-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,18 @@
"format": "rs fmt",
"lint": "rs lint",
"preview": "rs preview",
"test": "rs test"
"test": "rs test",
"test:watch": "rs test --watch"
},
"dependencies": {
"solid-js": "^1.9.14"
},
"devDependencies": {
"@rsbuild/plugin-babel": "^2.0.1",
"@rsbuild/plugin-solid": "^1.2.2",
"@solidjs/testing-library": "^0.8.10",
"@testing-library/jest-dom": "^7.0.0",
"happy-dom": "^20.11.1",
"rstack": "^0.3.5"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ define.app(async () => {
});

define.test({
// Configure Rstest
setupFiles: ['./tests/rstest.setup.js'],
});

define.lint(async () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { render, screen } from '@solidjs/testing-library';
import { expect, test } from 'rstack/test';
import App from '../src/App';

test('renders the main page', () => {
render(() => <App />);
expect(screen.getByText('Rstack with Solid')).toBeInTheDocument();
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { expect } from 'rstack/test';
import * as jestDomMatchers from '@testing-library/jest-dom/matchers';

expect.extend(jestDomMatchers);
3 changes: 3 additions & 0 deletions packages/create-rstack/template-app-solid-ts/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@
- `{{ packageManager }} run dev` - Start the development server
- `{{ packageManager }} run build` - Build the app for production
- `{{ packageManager }} run preview` - Preview the production build locally
- `{{ packageManager }} run test` - Run tests
- `{{ packageManager }} run test:watch` - Run tests in watch mode

## Docs

- Rsbuild: https://rsbuild.rs/llms.txt
- Rspack: https://rspack.rs/llms.txt
- Rstest: https://rstest.rs/llms.txt
6 changes: 5 additions & 1 deletion packages/create-rstack/template-app-solid-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,19 @@
"format": "rs fmt",
"lint": "rs lint",
"preview": "rs preview",
"test": "rs test"
"test": "rs test",
"test:watch": "rs test --watch"
},
"dependencies": {
"solid-js": "^1.9.14"
},
"devDependencies": {
"@rsbuild/plugin-babel": "^2.0.1",
"@rsbuild/plugin-solid": "^1.2.2",
"@solidjs/testing-library": "^0.8.10",
"@testing-library/jest-dom": "^7.0.0",
"@types/node": "^24.13.3",
"happy-dom": "^20.11.1",
"rstack": "^0.3.5",
"typescript": "^7.0.2"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ define.app(async () => {
});

define.test({
// Configure Rstest
setupFiles: ['./tests/rstest.setup.ts'],
});

define.lint(async () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { render, screen } from '@solidjs/testing-library';
import { expect, test } from 'rstack/test';
import App from '../src/App';

test('renders the main page', () => {
render(() => <App />);
expect(screen.getByText('Rstack with Solid')).toBeInTheDocument();
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { expect } from 'rstack/test';
import * as jestDomMatchers from '@testing-library/jest-dom/matchers';

expect.extend(jestDomMatchers);
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"types": ["rstack/types", "node", "@testing-library/jest-dom"]
},
"include": ["./"]
}
3 changes: 3 additions & 0 deletions packages/create-rstack/template-app-vanilla-js/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@
- `{{ packageManager }} run dev` - Start the development server
- `{{ packageManager }} run build` - Build the app for production
- `{{ packageManager }} run preview` - Preview the production build locally
- `{{ packageManager }} run test` - Run tests
- `{{ packageManager }} run test:watch` - Run tests in watch mode

## Docs

- Rsbuild: https://rsbuild.rs/llms.txt
- Rspack: https://rspack.rs/llms.txt
- Rstest: https://rstest.rs/llms.txt
6 changes: 5 additions & 1 deletion packages/create-rstack/template-app-vanilla-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,13 @@
"format": "rs fmt",
"lint": "rs lint",
"preview": "rs preview",
"test": "rs test"
"test": "rs test",
"test:watch": "rs test --watch"
},
"devDependencies": {
"@testing-library/dom": "^10.4.1",
"@testing-library/jest-dom": "^7.0.0",
"happy-dom": "^20.11.1",
"rstack": "^0.3.5"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ define.app({
});

define.test({
// Configure Rstest
setupFiles: ['./tests/rstest.setup.js'],
});

define.lint(async () => {
Expand Down
12 changes: 12 additions & 0 deletions packages/create-rstack/template-app-vanilla-js/tests/dom.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { expect, test } from 'rstack/test';
import { screen } from '@testing-library/dom';

test('test dom', () => {
document.body.innerHTML = `
<span data-testid="not-empty"><span data-testid="empty"></span></span>
<div data-testid="visible">Visible Example</div>
`;

expect(screen.queryByTestId('not-empty')).toBeInTheDocument();
expect(screen.getByText('Visible Example')).toBeVisible();
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { expect } from 'rstack/test';
import * as jestDomMatchers from '@testing-library/jest-dom/matchers';

expect.extend(jestDomMatchers);
3 changes: 3 additions & 0 deletions packages/create-rstack/template-app-vanilla-ts/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@
- `{{ packageManager }} run dev` - Start the development server
- `{{ packageManager }} run build` - Build the app for production
- `{{ packageManager }} run preview` - Preview the production build locally
- `{{ packageManager }} run test` - Run tests
- `{{ packageManager }} run test:watch` - Run tests in watch mode

## Docs

- Rsbuild: https://rsbuild.rs/llms.txt
- Rspack: https://rspack.rs/llms.txt
- Rstest: https://rstest.rs/llms.txt
6 changes: 5 additions & 1 deletion packages/create-rstack/template-app-vanilla-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@
"format": "rs fmt",
"lint": "rs lint",
"preview": "rs preview",
"test": "rs test"
"test": "rs test",
"test:watch": "rs test --watch"
},
"devDependencies": {
"@testing-library/dom": "^10.4.1",
"@testing-library/jest-dom": "^7.0.0",
"@types/node": "^24.13.3",
"happy-dom": "^20.11.1",
"rstack": "^0.3.5",
"typescript": "^7.0.2"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ define.app({
});

define.test({
// Configure Rstest
setupFiles: ['./tests/rstest.setup.ts'],
});

define.lint(async () => {
Expand Down
12 changes: 12 additions & 0 deletions packages/create-rstack/template-app-vanilla-ts/tests/dom.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { expect, test } from 'rstack/test';
import { screen } from '@testing-library/dom';

test('test dom', () => {
document.body.innerHTML = `
<span data-testid="not-empty"><span data-testid="empty"></span></span>
<div data-testid="visible">Visible Example</div>
`;

expect(screen.queryByTestId('not-empty')).toBeInTheDocument();
expect(screen.getByText('Visible Example')).toBeVisible();
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { expect } from 'rstack/test';
import * as jestDomMatchers from '@testing-library/jest-dom/matchers';

expect.extend(jestDomMatchers);
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"types": ["rstack/types", "node", "@testing-library/jest-dom"]
},
"include": ["./"]
}
3 changes: 3 additions & 0 deletions packages/create-rstack/template-app-vue-js/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@
- `{{ packageManager }} run dev` - Start the development server
- `{{ packageManager }} run build` - Build the app for production
- `{{ packageManager }} run preview` - Preview the production build locally
- `{{ packageManager }} run test` - Run tests
- `{{ packageManager }} run test:watch` - Run tests in watch mode

## Docs

- Rsbuild: https://rsbuild.rs/llms.txt
- Rspack: https://rspack.rs/llms.txt
- Rstest: https://rstest.rs/llms.txt
7 changes: 6 additions & 1 deletion packages/create-rstack/template-app-vue-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,18 @@
"format": "rs fmt",
"lint": "rs lint",
"preview": "rs preview",
"test": "rs test"
"test": "rs test",
"test:watch": "rs test --watch"
},
"dependencies": {
"vue": "^3.5.40"
},
"devDependencies": {
"@rsbuild/plugin-vue": "^2.0.1",
"@testing-library/jest-dom": "^7.0.0",
"@testing-library/vue": "^8.1.0",
"@vue/test-utils": "^2.4.11",
"happy-dom": "^20.11.1",
"rstack": "^0.3.5"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ define.app(async () => {
});

define.test({
// Configure Rstest
setupFiles: ['./tests/rstest.setup.js'],
});

define.lint(async () => {
Expand Down
Loading