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
1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"mdx.validate.validateFileLinks": "ignore",
"editor.defaultFormatter": "esbenp.prettier-vscode",
// Temporary workaround until we switch to the Rstack VS Code extension.
"prettier.printWidth": 100,
"prettier.singleQuote": true,
"js/ts.tsdk.path": "node_modules/typescript/lib",
"[typescript]": {
Expand Down
2 changes: 1 addition & 1 deletion examples/app-vanilla/tests/dom.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { expect, test } from 'rstack/test';
import { screen } from '@testing-library/dom';

test('test dom', () => {
test('renders content', () => {
document.body.innerHTML = `
<span data-testid="not-empty"><span data-testid="empty"></span></span>
<div data-testid="visible">Visible Example</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { expect, test } from 'rstack/test';
import { screen } from '@testing-library/dom';

test('test dom', () => {
test('renders content', () => {
document.body.innerHTML = `
<span data-testid="not-empty"><span data-testid="empty"></span></span>
<div data-testid="visible">Visible Example</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { expect, test } from 'rstack/test';
import { screen } from '@testing-library/dom';

test('test dom', () => {
test('renders content', () => {
document.body.innerHTML = `
<span data-testid="not-empty"><span data-testid="empty"></span></span>
<div data-testid="visible">Visible Example</div>
Expand Down
6 changes: 5 additions & 1 deletion rstack.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Configuration guide: https://rstack.rs/config
import { define } from 'rstack';

define.lint(async ({ js, ts }) => {
define.lint(async ({ js, ts, rstestPlugin }) => {
const { default: globals } = await import('globals');
return [
js.configs.recommended,
Expand All @@ -18,6 +18,10 @@ define.lint(async ({ js, ts }) => {
},
},
},
{
files: ['**/*.test.{ts,tsx}'],
...rstestPlugin.configs.recommended,
},
// Source imports use .ts for Node.js native TypeScript execution; builds rewrite them to .js.
{
files: ['packages/rstack/src/**/*.ts'],
Expand Down