Skip to content

Commit

Permalink
chore: update snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
nmerget committed Jan 14, 2025
1 parent dea2c7d commit bb48e8f
Showing 1 changed file with 32 additions and 10 deletions.
42 changes: 32 additions & 10 deletions packages/core/src/__tests__/__snapshots__/rsc.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1758,21 +1758,32 @@ export default MyComponent;
`;

exports[`RSC > jsx > Javascript Test > basicForFragment 1`] = `
"/**
useMetadata:
{\\"rsc\\":{\\"componentType\\":\\"server\\"}}
*/

"\\"use client\\";
import * as React from \\"react\\";
import { useState } from \\"react\\";

function BasicForFragment(props) {
const [id, setId] = useState(() => \\"xyz\\");

return (
<div>
{[\\"a\\", \\"b\\", \\"c\\"]?.map((option) => (
<React.Fragment key={\`key-\${option}\`}>
<div>{option}</div>
</React.Fragment>
))}
{[\\"a\\", \\"b\\", \\"c\\"]?.map((option) => (
<React.Fragment key={\`\${id}-\${option}\`}>
<div>{option}</div>
</React.Fragment>
))}
<select>
{[\\"d\\", \\"e\\", \\"f\\"]?.map((option) => (
<option key={\`\${id}-\${option}\`} value={option}>
{option}
</option>
))}
</select>
</div>
);
}
Expand Down Expand Up @@ -5648,21 +5659,32 @@ export default MyComponent;
`;

exports[`RSC > jsx > Typescript Test > basicForFragment 1`] = `
"/**
useMetadata:
{\\"rsc\\":{\\"componentType\\":\\"server\\"}}
*/

"\\"use client\\";
import * as React from \\"react\\";
import { useState } from \\"react\\";

function BasicForFragment(props: any) {
const [id, setId] = useState(() => \\"xyz\\");

return (
<div>
{[\\"a\\", \\"b\\", \\"c\\"]?.map((option) => (
<React.Fragment key={\`key-\${option}\`}>
<div>{option}</div>
</React.Fragment>
))}
{[\\"a\\", \\"b\\", \\"c\\"]?.map((option) => (
<React.Fragment key={\`\${id}-\${option}\`}>
<div>{option}</div>
</React.Fragment>
))}
<select>
{[\\"d\\", \\"e\\", \\"f\\"]?.map((option) => (
<option key={\`\${id}-\${option}\`} value={option}>
{option}
</option>
))}
</select>
</div>
);
}
Expand Down

0 comments on commit bb48e8f

Please sign in to comment.