You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -43,9 +43,17 @@ test('JSX syntax should be preserved', async () => {
43
43
44
44
test('throw error when preserve JSX with bundle mode',async()=>{
45
45
constfixturePath=join(__dirname,'forbid-bundle');
46
-
constbuild=buildAndGetResults({ fixturePath });
46
+
const{ logs, restore }=proxyConsole();
47
47
48
-
awaitexpect(build).rejects.toThrowError(
49
-
'Bundle mode does not support preserving JSX syntax. Set `bundle` to `false` or change the JSX runtime to `automatic` or `classic`.',
50
-
);
48
+
try{
49
+
awaitbuildAndGetResults({ fixturePath });
50
+
}catch{
51
+
expect(logs).toMatchInlineSnapshot(`
52
+
[
53
+
"error Bundle mode does not support preserving JSX syntax. Set "bundle" to "false" or change the JSX runtime to \`automatic\` or \`classic\`. Check out https://rslib.rs/guide/solution/react#jsx-transform for more details.",
0 commit comments