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
4 changes: 1 addition & 3 deletions e2e/cases/output/manifest-generate/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ const rsbuildConfig: RsbuildConfig = {
},
};

test('should generate custom manifest data in production build', async ({
build,
}) => {
test('should generate custom manifest data in build', async ({ build }) => {
const rsbuild = await build({
rsbuildConfig,
});
Expand Down
2 changes: 1 addition & 1 deletion e2e/cases/output/source-map/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ for (const devtool of productionDevtools) {
});
}

test('should not generate source map by default in production build', async ({
test('should not generate source map by default in build', async ({
build,
}) => {
const rsbuild = await build();
Expand Down
4 changes: 2 additions & 2 deletions e2e/cases/plugin-preact/basic/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { expect, rspackTest } from '@e2e/helper';

rspackTest(
'should render basic Preact component in development correctly',
'should render basic Preact component in dev',
async ({ page, dev }) => {
await dev();

Expand All @@ -13,7 +13,7 @@ rspackTest(
);

rspackTest(
'should render basic Preact component in production correctly',
'should render basic Preact component in build',
async ({ page, buildPreview }) => {
await buildPreview();

Expand Down
4 changes: 2 additions & 2 deletions e2e/cases/plugin-react/basic/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { expect, rspackTest } from '@e2e/helper';

rspackTest(
'should render basic React component in development correctly',
'should render basic React component in dev',
async ({ page, dev }) => {
await dev();

Expand All @@ -13,7 +13,7 @@ rspackTest(
);

rspackTest(
'should render basic React component in production correctly',
'should render basic React component in build',
async ({ page, buildPreview }) => {
await buildPreview();

Expand Down
19 changes: 19 additions & 0 deletions e2e/cases/plugin-react/jsx-runtime-classic/index.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { expect, rspackTest } from '@e2e/helper';

rspackTest(
'should render element with classic JSX runtime in build',
async ({ page, buildPreview }) => {
await buildPreview();
const testEl = page.locator('#test');
await expect(testEl).toHaveText('Hello Rsbuild!');
},
);

rspackTest(
'should render element with classic JSX runtime in dev',
async ({ page, dev }) => {
await dev();
const testEl = page.locator('#test');
await expect(testEl).toHaveText('Hello Rsbuild!');
},
);
7 changes: 7 additions & 0 deletions e2e/cases/plugin-react/jsx-runtime-preserve/index.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { expect, rspackTest } from '@e2e/helper';

rspackTest('should preserve JSX after build', async ({ build }) => {
const result = await build();
const content = await result.getIndexBundle();
expect(content.includes('<div id="test">Hello Rsbuild!</div>')).toBeTruthy();
});
10 changes: 10 additions & 0 deletions e2e/cases/plugin-react/jsx-runtime-preserve/rsbuild.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { defineConfig } from '@rsbuild/core';
import { pluginReact } from '@rsbuild/plugin-react';

export default defineConfig({
plugins: [
pluginReact({
swcReactOptions: { runtime: 'preserve' },
}),
],
});
6 changes: 6 additions & 0 deletions e2e/cases/plugin-react/jsx-runtime-preserve/src/App.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// biome-ignore lint/correctness/noUnusedImports: required in legacy jsx
import React from 'react';

const App = () => <div id="test">Hello Rsbuild!</div>;

export default App;
9 changes: 9 additions & 0 deletions e2e/cases/plugin-react/jsx-runtime-preserve/src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import React from 'react';
import { createRoot } from 'react-dom/client';
import App from './App';

const container = document.getElementById('root');
if (container) {
const root = createRoot(container);
root.render(React.createElement(App));
}
10 changes: 0 additions & 10 deletions e2e/cases/plugin-react/legacy-jsx/index.test.ts

This file was deleted.

4 changes: 2 additions & 2 deletions e2e/cases/plugin-react/react-compiler-babel/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { expect, rspackTest } from '@e2e/helper';

rspackTest(
'should render basic React component in development correctly',
'should render basic React component in dev',
async ({ page, dev }) => {
await dev();

Expand All @@ -13,7 +13,7 @@ rspackTest(
);

rspackTest(
'should render basic React component in production correctly',
'should render basic React component in build',
async ({ page, buildPreview }) => {
const rsbuild = await buildPreview();

Expand Down
2 changes: 1 addition & 1 deletion e2e/cases/source/define/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ test('should allow to define global variables in development', async ({
await expect(testEl).toHaveText('aaaaa');
});

test('should allow to define global variables in production build', async ({
test('should allow to define global variables in build', async ({
page,
buildPreview,
}) => {
Expand Down
2 changes: 1 addition & 1 deletion e2e/cases/source/pre-entry/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ test('should allow to configure pre-entry in development', async ({
await expect(page.evaluate('window.aa')).resolves.toBe(2);
});

test('should allow to configure pre-entry in production build', async ({
test('should allow to configure pre-entry in build', async ({
page,
buildPreview,
}) => {
Expand Down
2 changes: 1 addition & 1 deletion e2e/cases/swc-plugin/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ rspackTest(
);

rspackTest(
'should run SWC Wasm plugin correctly in production build',
'should run SWC Wasm plugin correctly in build',
async ({ page, build }) => {
const rsbuild = await build({
runServer: true,
Expand Down
Loading