Skip to content

Commit a2a287a

Browse files
authored
test(rsc): tweak assertions for rolldown-vite (#869)
1 parent a96a6b2 commit a2a287a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/plugin-rsc/e2e/validate-imports.test.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,10 @@ test.describe('validate imports', () => {
102102
throwOnError: false,
103103
nodeOptions: { cwd: root },
104104
})
105+
// assertion is adjusted for rolldown-vite
106+
expect(result.stderr).toContain(`rsc:validate-imports`)
105107
expect(result.stderr).toContain(
106-
`[rsc:validate-imports] 'server-only' cannot be imported in client build`,
108+
`'server-only' cannot be imported in client build`,
107109
)
108110
expect(result.exitCode).not.toBe(0)
109111
})
@@ -151,8 +153,9 @@ test.describe('validate imports', () => {
151153
throwOnError: false,
152154
nodeOptions: { cwd: root },
153155
})
156+
expect(result.stderr).toContain(`rsc:validate-imports`)
154157
expect(result.stderr).toContain(
155-
`[rsc:validate-imports] 'client-only' cannot be imported in server build`,
158+
`'client-only' cannot be imported in server build`,
156159
)
157160
expect(result.exitCode).not.toBe(0)
158161
})

0 commit comments

Comments
 (0)