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 packages/plugin-babel/tests/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { createRsbuild } from '@rsbuild/core';
import { matchRules } from '@scripts/test-helper';
import { describe, expect, it } from 'vitest';
import { pluginBabel } from '../src';

describe('plugins/babel', () => {
Expand Down
8 changes: 8 additions & 0 deletions packages/plugin-babel/tests/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "@rsbuild/config/tsconfig",
"compilerOptions": {
"baseUrl": "./",
"types": ["vitest/globals"]
},
"include": ["./**/*.ts"]
}
1 change: 0 additions & 1 deletion packages/plugin-preact/tests/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { createRsbuild } from '@rsbuild/core';
import { describe, expect, it } from 'vitest';
import { pluginPreact } from '../src';

describe('plugins/preact', () => {
Expand Down
8 changes: 8 additions & 0 deletions packages/plugin-preact/tests/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "@rsbuild/config/tsconfig",
"compilerOptions": {
"baseUrl": "./",
"types": ["vitest/globals"]
},
"include": ["./**/*.ts"]
}
1 change: 0 additions & 1 deletion packages/plugin-react/tests/features.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { createStubRsbuild } from '@scripts/test-helper';
import { describe, expect, it, vi } from 'vitest';
import { pluginReact } from '../src';

describe('splitChunks', () => {
Expand Down
1 change: 0 additions & 1 deletion packages/plugin-react/tests/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { createStubRsbuild, matchRules } from '@scripts/test-helper';
import { describe, expect, it } from 'vitest';
import { pluginReact } from '../src';

describe('plugins/react', () => {
Expand Down
8 changes: 8 additions & 0 deletions packages/plugin-react/tests/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "@rsbuild/config/tsconfig",
"compilerOptions": {
"baseUrl": "./",
"types": ["vitest/globals"]
},
"include": ["./**/*.ts"]
}
1 change: 0 additions & 1 deletion packages/plugin-svgr/tests/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { createRsbuild } from '@rsbuild/core';
import { pluginReact } from '@rsbuild/plugin-react';
import { matchRules } from '@scripts/test-helper';
import { describe, expect, it } from 'vitest';
import { type PluginSvgrOptions, pluginSvgr } from '../src';

describe('svgr', () => {
Expand Down
8 changes: 8 additions & 0 deletions packages/plugin-svgr/tests/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
Copy link

Copilot AI May 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Test tsconfig files across multiple packages are nearly identical. Consider extracting a shared base tsconfig (e.g., tsconfig.tests.json) and having each package extend it to reduce duplication.

Copilot uses AI. Check for mistakes.
"extends": "@rsbuild/config/tsconfig",
"compilerOptions": {
"baseUrl": "./",
"types": ["vitest/globals"]
},
"include": ["./**/*.ts"]
}
3 changes: 2 additions & 1 deletion scripts/test-helper/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"outDir": "./dist",
"baseUrl": "./",
"rootDir": "src",
"composite": true
"composite": true,
"types": ["vitest/globals"]
},
"references": [
{
Expand Down
1 change: 0 additions & 1 deletion scripts/test-helper/vitest.setup.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import path from 'node:path';
import { createSnapshotSerializer } from 'path-serializer';
import { beforeAll, expect } from 'vitest';

beforeAll((suite) => {
process.env.REBUILD_TEST_SUITE_CWD =
Expand Down
Loading