silverwolf-x's picture
download
raw
982 Bytes
import { nextTestSetup } from 'e2e-utils'
import { retry } from 'next-test-utils'
describe('browser-log-forwarding error level', () => {
const { next } = nextTestSetup({
files: __dirname,
})
it('should only forward error logs to terminal', async () => {
const outputIndex = next.cliOutput.length
await next.browser('/')
await retry(() => {
const output = next.cliOutput.slice(outputIndex)
expect(output).toContain('browser error:')
})
// Get final output after logs are forwarded
const output = next.cliOutput.slice(outputIndex)
// Filter to only browser forwarded logs, excluding hydration noise
const browserLogs = output
.split('\n')
.filter(
(line) =>
line.includes('[browser]') &&
!line.includes('Next.js hydrate callback fire')
)
.join('\n')
expect(browserLogs).toMatchInlineSnapshot(
`"[browser] browser error: this is an error message "`
)
})
})

Xet Storage Details

Size:
982 Bytes
·
Xet hash:
ba08728bac70a9b111f2cc494cc956037a905d13b5b4d3a4b03167b4322c5e7b

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.