mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
[diff facebook/[email protected]](https://github.com/facebook/react/compare/fef12a01...da9325b5) <details> <summary>React upstream changes</summary> - https://github.com/facebook/react/pull/35962 - https://github.com/facebook/react/pull/35961 - https://github.com/facebook/react/pull/36277 - https://github.com/facebook/react/pull/36297 - https://github.com/facebook/react/pull/36292 - https://github.com/facebook/react/pull/36291 - https://github.com/facebook/react/pull/36196 - https://github.com/facebook/react/pull/36246 - https://github.com/facebook/react/pull/36287 - https://github.com/facebook/react/pull/36285 - https://github.com/facebook/react/pull/36274 - https://github.com/facebook/react/pull/36266 - https://github.com/facebook/react/pull/36253 </details>
24 lines
789 B
TypeScript
24 lines
789 B
TypeScript
import { nextTestSetup } from 'e2e-utils'
|
|
|
|
const GENERIC_RSC_ERROR =
|
|
'Minified React error #441; visit https://react.dev/errors/441 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.'
|
|
|
|
export function runTest({ next, isNextDev }) {
|
|
it('should error when passing process env to client component', async () => {
|
|
const browser = await next.browser('/')
|
|
expect(await browser.waitForElementByCss('#error-component').text()).toBe(
|
|
isNextDev
|
|
? 'Do not pass process.env to Client Components since it will leak sensitive data'
|
|
: GENERIC_RSC_ERROR
|
|
)
|
|
})
|
|
}
|
|
|
|
describe('app dir - taint', () => {
|
|
const { next, isNextDev } = nextTestSetup({
|
|
files: __dirname,
|
|
})
|
|
|
|
runTest({ next, isNextDev })
|
|
})
|