Skip to content
Merged
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
10 changes: 10 additions & 0 deletions packages/plugin-rsc/e2e/source-map.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ type ReferenceCase = {
name: string
rolldown: string
rollup?: string | null
result?: string
}

// TODO: Add separate CDP stack coverage for Server Action and Server Component
Expand Down Expand Up @@ -77,6 +78,7 @@ const serverReferenceCases: {
name: 're-export',
rolldown: '/src/features/specifiers/reexport.ts:0:0',
rollup: null,
result: 're-export called',
},
{
// Rolldown resolves to the directive while Rollup has no mapping.
Expand Down Expand Up @@ -186,6 +188,14 @@ test.describe('source map', () => {
? reference.rolldown
: reference.rollup
expect.soft(actual).toBe(expected)

if (reference.result) {
const button = page.getByRole('button', {
name: new RegExp(`^${reference.name}:`),
})
await button.click()
await expect(button).toContainText(reference.result)
}
}
})
}
Expand Down
Loading