Buckets:
silverwolf-x/project / test /development /app-dir /serialize-circular-error /serialize-circular-error.test.ts
| import { nextTestSetup } from 'e2e-utils' | |
| describe('serialize-circular-error', () => { | |
| const { next } = nextTestSetup({ | |
| files: __dirname, | |
| }) | |
| it('should serialize the object from server component in console correctly', async () => { | |
| const browser = await next.browser('/') | |
| await expect(browser).toDisplayRedbox(` | |
| { | |
| "code": "E394", | |
| "description": "An error occurred but serializing the error message failed.", | |
| "environmentLabel": "Server", | |
| "label": "Runtime Error", | |
| "source": null, | |
| "stack": [], | |
| } | |
| `) | |
| const output = next.cliOutput | |
| expect(output).toContain( | |
| 'Error: {"objA":{"other":{"a":"[Circular]"}},"objB":"[Circular]"}' | |
| ) | |
| }) | |
| it('should serialize the object from client component in console correctly', async () => { | |
| const browser = await next.browser('/client') | |
| // TODO: Format arbitrary messages in Redbox | |
| await expect(browser).toDisplayRedbox(` | |
| { | |
| "code": "E394", | |
| "description": "[object Object]", | |
| "environmentLabel": null, | |
| "label": "Runtime Error", | |
| "source": null, | |
| "stack": [], | |
| } | |
| `) | |
| const bodyText = await browser.elementByCss('body').text() | |
| expect(bodyText).toContain('This page couldn\u2019t load') | |
| const output = next.cliOutput | |
| expect(output).toContain( | |
| 'Error: {"objC":{"other":{"a":"[Circular]"}},"objD":"[Circular]"}' | |
| ) | |
| }) | |
| }) | |
Xet Storage Details
- Size:
- 1.43 kB
- Xet hash:
- d0ef5da2c6571e203ae78435f8b5fb5314c3d44554d4f6d84f90ef8c17fb97bc
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.