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
2 changes: 1 addition & 1 deletion e2e/browser-mode/coverage.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe('browser mode - coverage', () => {

it('should collect coverage data successfully without include option', async () => {
const { expectExecSuccess, cli } = await runBrowserCli('browser-coverage', {
args: ['-c', 'rstest.noInclude.config.ts'],
args: ['-c', 'rstest.noInclude.config.mts'],
});

await expectExecSuccess();
Expand Down
4 changes: 2 additions & 2 deletions e2e/browser-mode/fixtures/config/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// @ts-expect-error - @test-alias is defined via resolve.alias in rstest.config.ts
// @ts-expect-error - @test-alias is defined via resolve.alias in rstest.config.mts
import { ALIASED_VALUE } from '@test-alias';

// This test uses globals: true config
Expand All @@ -19,7 +19,7 @@ describe('globals config', () => {

describe('rsbuild config options', () => {
it('should support source.define', () => {
// @ts-expect-error - __TEST_DEFINE__ is defined via source.define in rstest.config.ts
// @ts-expect-error - __TEST_DEFINE__ is defined via source.define in rstest.config.mts
expect(__TEST_DEFINE__).toBe('define-value');
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
"jsx": "react-jsx",
"types": ["@rstest/core"]
},
"include": ["tests", "rstest.config.ts"]
"include": ["tests", "rstest.config.mts"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
"moduleResolution": "bundler",
"types": ["@rstest/core"]
},
"include": ["tests", "rstest.config.ts"]
"include": ["tests", "rstest.config.mts"]
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineConfig } from '@rstest/core';

export default defineConfig({
projects: ['./project-b/rstest.config.ts', './project-a/rstest.config.ts'],
projects: ['./project-b/rstest.config.mts', './project-a/rstest.config.mts'],
});
4 changes: 2 additions & 2 deletions e2e/build/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('test build config', () => {
'run',
`fixtures/${name}`,
'-c',
`fixtures/${name}/rstest.config.ts`,
`fixtures/${name}/rstest.config.mts`,
],
onTestFinished,
options: {
Expand Down Expand Up @@ -54,7 +54,7 @@ describe('test build config', () => {
'run',
'fixtures/customOutput',
'-c',
'fixtures/customOutput/rstest.config.ts',
'fixtures/customOutput/rstest.config.mts',
],
onTestFinished,
options: {
Expand Down
4 changes: 2 additions & 2 deletions e2e/cli/initBrowser.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ describe('cli init browser', () => {
await expectExecSuccess();

expect(
fs.existsSync(path.join(projectDir, 'rstest.browser.config.ts')),
fs.existsSync(path.join(projectDir, 'rstest.browser.config.mts')),
).toBe(true);

expect(
Expand All @@ -51,7 +51,7 @@ describe('cli init browser', () => {

const pkg = readJson(path.join(projectDir, 'package.json'));
expect(pkg.scripts?.['test:browser']).toBe(
'rstest --config=rstest.browser.config.ts',
'rstest --config=rstest.browser.config.mts',
);
});
});
File renamed without changes.
4 changes: 2 additions & 2 deletions e2e/dom/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { runCli } from './utils';
const appFilters = 'test/App';
const jestDomFilters = 'test/jestDom';

const externalConfigArgs = ['--config', 'rstest.externals.config.ts'];
const externalConfigArgs = ['--config', 'rstest.externals.config.mts'];

describe('jsdom', () => {
it('should run test correctly', async () => {
Expand All @@ -26,7 +26,7 @@ describe('jsdom', () => {

it('should run test correctly with custom environment options', async () => {
const { expectExecSuccess } = await runCli('test/envOptions', undefined, {
args: ['--config', 'rstest.envOptions.config.ts'],
args: ['--config', 'rstest.envOptions.config.mts'],
});
await expectExecSuccess();
});
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion e2e/exclude/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ describe('test exclude option', () => {
it('should not exclude dist when override is true', async () => {
const { expectLog, expectExecFailed } = await runRstestCli({
command: 'rstest',
args: ['run', '-c', 'rstest.override.config.ts'],
args: ['run', '-c', 'rstest.override.config.mts'],
options: {
nodeOptions: {
cwd: join(__dirname, 'fixtures'),
Expand Down
6 changes: 3 additions & 3 deletions e2e/externals/bundleDependencies.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ describe('test bundleDependencies', () => {
'./fixtures/index.test.ts',
'--testEnvironment=jsdom',
'-c',
'./fixtures/rstest.noBundleDeps.config.ts',
'./fixtures/rstest.noBundleDeps.config.mts',
],
options: {
nodeOptions: {
Expand All @@ -52,7 +52,7 @@ describe('test bundleDependencies', () => {
'./fixtures/index.test.ts',
'--testEnvironment=jsdom',
'-c',
'./fixtures/rstest.debug.config.ts',
'./fixtures/rstest.debug.config.mts',
],
options: {
nodeOptions: {
Expand All @@ -76,7 +76,7 @@ describe('test bundleDependencies', () => {
'run',
'./fixtures/index.test.ts',
'-c',
'./fixtures/rstest.bundleDeps.config.ts',
'./fixtures/rstest.bundleDeps.config.mts',
],
options: {
nodeOptions: {
Expand Down
2 changes: 1 addition & 1 deletion e2e/externals/interop.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ describe('test interop', () => {
'./fixtures/interopLodash',
'--testEnvironment=node',
'-c',
'./fixtures/rstest.lodash.config.ts',
'./fixtures/rstest.lodash.config.mts',
]
: ['run', './fixtures/interopLodash', '--testEnvironment=node'],
options: {
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions e2e/projects/coverage.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ describe('test projects coverage', () => {
it('should run projects correctly with coverage', async () => {
const { cli, expectExecSuccess } = await runRstestCli({
command: 'rstest',
args: ['run', '--globals', '-c', 'rstest.coverage.config.ts'],
args: ['run', '--globals', '-c', 'rstest.coverage.config.mts'],
options: {
nodeOptions: {
cwd: join(__dirname, 'fixtures'),
Expand Down Expand Up @@ -50,7 +50,7 @@ describe('test projects coverage', () => {
it('should run projects correctly with coverage.include', async () => {
const { cli, expectExecSuccess } = await runRstestCli({
command: 'rstest',
args: ['run', '--globals', '-c', 'rstest.coverage.include.config.ts'],
args: ['run', '--globals', '-c', 'rstest.coverage.include.config.mts'],
options: {
nodeOptions: {
cwd: join(__dirname, 'fixtures'),
Expand Down
10 changes: 5 additions & 5 deletions e2e/projects/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ describe('test projects', () => {
it('should run project correctly with specified config root', async () => {
const { cli, expectExecSuccess } = await runRstestCli({
command: 'rstest',
args: ['run', '--globals', '-c', 'packages/client/rstest.config.ts'],
args: ['run', '--globals', '-c', 'packages/client/rstest.config.mts'],
options: {
nodeOptions: {
cwd: join(__dirname, 'fixtures'),
Expand All @@ -78,7 +78,7 @@ describe('test projects', () => {
it('should run projects fail when project not found', async () => {
const { expectExecFailed, expectStderrLog } = await runRstestCli({
command: 'rstest',
args: ['run', '-c', 'rstest.404.config.ts'],
args: ['run', '-c', 'rstest.404.config.mts'],
options: {
nodeOptions: {
cwd: join(__dirname, 'fixtures'),
Expand Down Expand Up @@ -151,7 +151,7 @@ describe('test projects', () => {
args: [
'run',
'-c',
'rstest.projectConfig.config.ts',
'rstest.projectConfig.config.mts',
'--reporter',
'verbose',
],
Expand Down Expand Up @@ -184,7 +184,7 @@ describe('test projects', () => {
args: [
'run',
'-c',
'rstest.slowTest.config.ts',
'rstest.slowTest.config.mts',
'--reporter',
'verbose',
],
Expand All @@ -210,7 +210,7 @@ describe('test projects', () => {
it('should respect hideSkippedTestFiles per project', async () => {
const { cli, expectExecSuccess } = await runRstestCli({
command: 'rstest',
args: ['run', '-c', 'rstest.hideSkippedTestFiles.config.ts'],
args: ['run', '-c', 'rstest.hideSkippedTestFiles.config.mts'],
options: {
nodeOptions: {
cwd: join(__dirname, 'fixtures'),
Expand Down
2 changes: 1 addition & 1 deletion e2e/projects/inline.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe('test projects inline projectConfig', () => {
it('should run projects correctly with inline projectConfig', async () => {
const { cli, expectExecSuccess } = await runRstestCli({
command: 'rstest',
args: ['run', '-c', 'rstest.inline.config.ts'],
args: ['run', '-c', 'rstest.inline.config.mts'],
options: {
nodeOptions: {
cwd: join(__dirname, 'fixtures'),
Expand Down
23 changes: 14 additions & 9 deletions e2e/reporter/md.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('md', () => {
}) => {
const { cli } = await runRstestCli({
command: 'rstest',
args: ['run', 'agent-md/index', '-c', './rstest.agentMd.config.ts'],
args: ['run', 'agent-md/index', '-c', './rstest.agentMd.config.mts'],
onTestFinished,
unsetEnv: UNSET_ENV,
options: {
Expand Down Expand Up @@ -124,7 +124,7 @@ describe('md', () => {
'run',
'agent-md/snapshotMismatch',
'-c',
'./rstest.agentMd.snapshotMismatch.config.ts',
'./rstest.agentMd.snapshotMismatch.config.mts',
],
onTestFinished,
unsetEnv: UNSET_ENV,
Expand Down Expand Up @@ -226,7 +226,7 @@ describe('md', () => {
'run',
'agent-md/console',
'-c',
'./rstest.agentMd.console.config.ts',
'./rstest.agentMd.console.config.mts',
],
onTestFinished,
unsetEnv: UNSET_ENV,
Expand Down Expand Up @@ -341,7 +341,12 @@ describe('md', () => {
it('formats thrown errors', async ({ onTestFinished }) => {
const { cli } = await runRstestCli({
command: 'rstest',
args: ['run', 'agent-md/throw', '-c', './rstest.agentMd.throw.config.ts'],
args: [
'run',
'agent-md/throw',
'-c',
'./rstest.agentMd.throw.config.mts',
],
onTestFinished,
unsetEnv: UNSET_ENV,
options: {
Expand Down Expand Up @@ -430,7 +435,7 @@ describe('md', () => {
'run',
'agent-md/timeout',
'-c',
'./rstest.agentMd.timeout.config.ts',
'./rstest.agentMd.timeout.config.mts',
],
onTestFinished,
unsetEnv: UNSET_ENV,
Expand Down Expand Up @@ -522,7 +527,7 @@ describe('md', () => {
'run',
'agent-md/truncated',
'-c',
'./rstest.agentMd.truncated.config.ts',
'./rstest.agentMd.truncated.config.mts',
],
onTestFinished,
unsetEnv: UNSET_ENV,
Expand Down Expand Up @@ -700,7 +705,7 @@ describe('md', () => {
it('omits lists on non-focused passing runs', async ({ onTestFinished }) => {
const { cli } = await runRstestCli({
command: 'rstest',
args: ['run', '-c', './rstest.agentMd.pass.config.ts'],
args: ['run', '-c', './rstest.agentMd.pass.config.mts'],
onTestFinished,
unsetEnv: UNSET_ENV,
options: {
Expand Down Expand Up @@ -769,7 +774,7 @@ describe('md', () => {
}) => {
const { cli } = await runRstestCli({
command: 'rstest',
args: ['run', 'agent-md-pass', '-c', './rstest.agentMd.pass.config.ts'],
args: ['run', 'agent-md-pass', '-c', './rstest.agentMd.pass.config.mts'],
onTestFinished,
unsetEnv: UNSET_ENV,
options: {
Expand Down Expand Up @@ -861,7 +866,7 @@ describe('md', () => {
'run',
'agent-md/unhandled',
'-c',
'./rstest.agentMd.unhandled.config.ts',
'./rstest.agentMd.unhandled.config.mts',
],
onTestFinished,
unsetEnv: UNSET_ENV,
Expand Down
11 changes: 8 additions & 3 deletions e2e/reporter/mergeReports.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ describe('merge-reports', () => {
'1/2',
'--reporter=blob',
'-c',
'rstest.coverage.config.ts',
'rstest.coverage.config.mts',
],
options: {
nodeOptions: {
Expand All @@ -114,7 +114,7 @@ describe('merge-reports', () => {
'2/2',
'--reporter=blob',
'-c',
'rstest.coverage.config.ts',
'rstest.coverage.config.mts',
],
options: {
nodeOptions: {
Expand All @@ -128,7 +128,12 @@ describe('merge-reports', () => {
const { cli: mergeCli, expectExecSuccess: mergeSuccess } =
await runRstestCli({
command: 'rstest',
args: ['merge-reports', '--cleanup', '-c', 'rstest.coverage.config.ts'],
args: [
'merge-reports',
'--cleanup',
'-c',
'rstest.coverage.config.mts',
],
options: {
nodeOptions: {
cwd: fixturesDir,
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions e2e/setup/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ describe('test setup file', async () => {
it('should resolve setup file correctly when setupFiles path with file protocol', async () => {
const { expectExecSuccess } = await runRstestCli({
command: 'rstest',
args: ['run', '-c', 'rstest.fileProtocol.config.ts'],
args: ['run', '-c', 'rstest.fileProtocol.config.mts'],
options: {
nodeOptions: {
cwd: join(__dirname, 'fixtures/package-name'),
Expand All @@ -73,7 +73,7 @@ describe('test setup file', async () => {
it('should resolve setup file correctly when setupFile is pure es module', async () => {
const { expectExecSuccess } = await runRstestCli({
command: 'rstest',
args: ['run', '-c', 'rstest.esm.config.ts'],
args: ['run', '-c', 'rstest.esm.config.mts'],
options: {
nodeOptions: {
cwd: join(__dirname, 'fixtures/package-name'),
Expand Down
2 changes: 1 addition & 1 deletion e2e/snapshot/file.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ describe('test snapshot', () => {
'fixtures/index.test.ts',
'-u',
'-c',
'fixtures/rstest.snapshotPath.config.ts',
'fixtures/rstest.snapshotPath.config.mts',
],
options: {
nodeOptions: {
Expand Down
2 changes: 1 addition & 1 deletion e2e/snapshot/options.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const __dirname = dirname(__filename);
it('snapshotFormat', async () => {
const { expectExecSuccess } = await runRstestCli({
command: 'rstest',
args: ['run', 'options.test.ts', '-c', 'rstest.options.config.ts'],
args: ['run', 'options.test.ts', '-c', 'rstest.options.config.mts'],
options: {
nodeOptions: {
cwd: join(__dirname, 'fixtures'),
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"nano-staged": {
"*.{md,mdx,css,less,scss,json,jsonc,json5}": "prettier --write",
"*.{js,jsx,ts,tsx,mjs,cjs}": [
"*.{js,jsx,ts,tsx,mjs,mts,cjs,cts}": [
"biome check --write"
],
"package.json": [
Expand Down
2 changes: 1 addition & 1 deletion packages/adapter-rsbuild/rslib.config.mts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineConfig } from '@rslib/core';
import { rsdoctorCIPlugin } from '../../scripts/rsdoctorPlugin.ts';
import { rsdoctorCIPlugin } from '../../scripts/rsdoctorPlugin';

export default defineConfig({
lib: [
Expand Down
2 changes: 1 addition & 1 deletion packages/adapter-rslib/rslib.config.mts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineConfig } from '@rslib/core';
import { rsdoctorCIPlugin } from '../../scripts/rsdoctorPlugin.ts';
import { rsdoctorCIPlugin } from '../../scripts/rsdoctorPlugin';

export default defineConfig({
lib: [
Expand Down
2 changes: 1 addition & 1 deletion packages/adapter-rspack/rslib.config.mts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineConfig } from '@rslib/core';
import { rsdoctorCIPlugin } from '../../scripts/rsdoctorPlugin.ts';
import { rsdoctorCIPlugin } from '../../scripts/rsdoctorPlugin';

export default defineConfig({
lib: [
Expand Down
Loading
Loading