Unverified Commit ed012691 authored by Will Binns-Smith's avatar Will Binns-Smith Committed by GitHub

Update test snapshots for alternative bundler [6/n] (#76768)

Test Plan: `pnpm test-start-rspack
test/integration/server-side-dev-errors/test/index.test.js` passes
parent 539c644b
...@@ -12,6 +12,8 @@ import { ...@@ -12,6 +12,8 @@ import {
} from 'next-test-utils' } from 'next-test-utils'
import stripAnsi from 'strip-ansi' import stripAnsi from 'strip-ansi'
const isRspack = process.env.NEXT_RSPACK !== undefined
const appDir = join(__dirname, '../') const appDir = join(__dirname, '../')
const gspPage = join(appDir, 'pages/gsp.js') const gspPage = join(appDir, 'pages/gsp.js')
const gsspPage = join(appDir, 'pages/gssp.js') const gsspPage = join(appDir, 'pages/gssp.js')
...@@ -518,7 +520,7 @@ describe('server-side dev errors', () => { ...@@ -518,7 +520,7 @@ describe('server-side dev errors', () => {
) )
.trim() .trim()
// FIXME(veil): error repeated // FIXME(veil): error repeated
if (isTurbopack) { if (isTurbopack || isRspack) {
expect(stderrOutput).toMatchInlineSnapshot(` expect(stderrOutput).toMatchInlineSnapshot(`
"Error: catch this rejection "Error: catch this rejection
at Timeout._onTimeout (../../test/integration/server-side-dev-errors/pages/uncaught-rejection.js:7:19) at Timeout._onTimeout (../../test/integration/server-side-dev-errors/pages/uncaught-rejection.js:7:19)
...@@ -597,65 +599,65 @@ describe('server-side dev errors', () => { ...@@ -597,65 +599,65 @@ describe('server-side dev errors', () => {
) )
.trim() .trim()
// FIXME(veil): error repeated // FIXME(veil): error repeated
if (isTurbopack) { if (isTurbopack || isRspack) {
expect(stderrOutput).toMatchInlineSnapshot(` expect(stderrOutput).toMatchInlineSnapshot(`
"Error: "Error:
at Timeout._onTimeout (../../test/integration/server-side-dev-errors/pages/uncaught-empty-rejection.js:7:19) at Timeout._onTimeout (../../test/integration/server-side-dev-errors/pages/uncaught-empty-rejection.js:7:19)
5 | export async function getServerSideProps() { 5 | export async function getServerSideProps() {
6 | setTimeout(() => { 6 | setTimeout(() => {
> 7 | Promise.reject(new Error()) > 7 | Promise.reject(new Error())
| ^ | ^
8 | }, 10) 8 | }, 10)
9 | return { 9 | return {
10 | props: {}, 10 | props: {},
⨯ unhandledRejection: Error: ⨯ unhandledRejection: Error:
at Timeout._onTimeout (../../test/integration/server-side-dev-errors/pages/uncaught-empty-rejection.js:7:19) at Timeout._onTimeout (../../test/integration/server-side-dev-errors/pages/uncaught-empty-rejection.js:7:19)
5 | export async function getServerSideProps() { 5 | export async function getServerSideProps() {
6 | setTimeout(() => { 6 | setTimeout(() => {
> 7 | Promise.reject(new Error()) > 7 | Promise.reject(new Error())
| ^ | ^
8 | }, 10) 8 | }, 10)
9 | return { 9 | return {
10 | props: {}, 10 | props: {},
⨯ unhandledRejection: Error: ⨯ unhandledRejection: Error:
at Timeout._onTimeout (../../test/integration/server-side-dev-errors/pages/uncaught-empty-rejection.js:7:19) at Timeout._onTimeout (../../test/integration/server-side-dev-errors/pages/uncaught-empty-rejection.js:7:19)
5 | export async function getServerSideProps() { 5 | export async function getServerSideProps() {
6 | setTimeout(() => { 6 | setTimeout(() => {
> 7 | Promise.reject(new Error()) > 7 | Promise.reject(new Error())
| ^ | ^
8 | }, 10) 8 | }, 10)
9 | return { 9 | return {
10 | props: {}," 10 | props: {},"
`) `)
} else { } else {
expect(stderrOutput).toMatchInlineSnapshot(` expect(stderrOutput).toMatchInlineSnapshot(`
"Error: "Error:
at Timeout.eval [as _onTimeout] (../../test/integration/server-side-dev-errors/pages/uncaught-empty-rejection.js:7:19) at Timeout.eval [as _onTimeout] (../../test/integration/server-side-dev-errors/pages/uncaught-empty-rejection.js:7:19)
5 | export async function getServerSideProps() { 5 | export async function getServerSideProps() {
6 | setTimeout(() => { 6 | setTimeout(() => {
> 7 | Promise.reject(new Error()) > 7 | Promise.reject(new Error())
| ^ | ^
8 | }, 10) 8 | }, 10)
9 | return { 9 | return {
10 | props: {}, 10 | props: {},
⨯ unhandledRejection: Error: ⨯ unhandledRejection: Error:
at Timeout.eval [as _onTimeout] (../../test/integration/server-side-dev-errors/pages/uncaught-empty-rejection.js:7:19) at Timeout.eval [as _onTimeout] (../../test/integration/server-side-dev-errors/pages/uncaught-empty-rejection.js:7:19)
5 | export async function getServerSideProps() { 5 | export async function getServerSideProps() {
6 | setTimeout(() => { 6 | setTimeout(() => {
> 7 | Promise.reject(new Error()) > 7 | Promise.reject(new Error())
| ^ | ^
8 | }, 10) 8 | }, 10)
9 | return { 9 | return {
10 | props: {}, 10 | props: {},
⨯ unhandledRejection: Error: ⨯ unhandledRejection: Error:
at Timeout.eval [as _onTimeout] (../../test/integration/server-side-dev-errors/pages/uncaught-empty-rejection.js:7:19) at Timeout.eval [as _onTimeout] (../../test/integration/server-side-dev-errors/pages/uncaught-empty-rejection.js:7:19)
5 | export async function getServerSideProps() { 5 | export async function getServerSideProps() {
6 | setTimeout(() => { 6 | setTimeout(() => {
> 7 | Promise.reject(new Error()) > 7 | Promise.reject(new Error())
| ^ | ^
8 | }, 10) 8 | }, 10)
9 | return { 9 | return {
10 | props: {}," 10 | props: {},"
`) `)
} }
}) })
...@@ -675,7 +677,7 @@ describe('server-side dev errors', () => { ...@@ -675,7 +677,7 @@ describe('server-side dev errors', () => {
) )
.trim() .trim()
// FIXME(veil): error repeated // FIXME(veil): error repeated
if (isTurbopack) { if (isTurbopack || isRspack) {
expect(stderrOutput).toMatchInlineSnapshot(` expect(stderrOutput).toMatchInlineSnapshot(`
"Error: catch this exception "Error: catch this exception
at Timeout._onTimeout (../../test/integration/server-side-dev-errors/pages/uncaught-exception.js:7:10) at Timeout._onTimeout (../../test/integration/server-side-dev-errors/pages/uncaught-exception.js:7:10)
...@@ -753,65 +755,65 @@ describe('server-side dev errors', () => { ...@@ -753,65 +755,65 @@ describe('server-side dev errors', () => {
) )
.trim() .trim()
// FIXME(veil): error repeated // FIXME(veil): error repeated
if (isTurbopack) { if (isTurbopack || isRspack) {
expect(stderrOutput).toMatchInlineSnapshot(` expect(stderrOutput).toMatchInlineSnapshot(`
"Error: "Error:
at Timeout._onTimeout (../../test/integration/server-side-dev-errors/pages/uncaught-empty-exception.js:7:10) at Timeout._onTimeout (../../test/integration/server-side-dev-errors/pages/uncaught-empty-exception.js:7:10)
5 | export async function getServerSideProps() { 5 | export async function getServerSideProps() {
6 | setTimeout(() => { 6 | setTimeout(() => {
> 7 | throw new Error() > 7 | throw new Error()
| ^ | ^
8 | }, 10) 8 | }, 10)
9 | return { 9 | return {
10 | props: {}, 10 | props: {},
⨯ uncaughtException: Error: ⨯ uncaughtException: Error:
at Timeout._onTimeout (../../test/integration/server-side-dev-errors/pages/uncaught-empty-exception.js:7:10) at Timeout._onTimeout (../../test/integration/server-side-dev-errors/pages/uncaught-empty-exception.js:7:10)
5 | export async function getServerSideProps() { 5 | export async function getServerSideProps() {
6 | setTimeout(() => { 6 | setTimeout(() => {
> 7 | throw new Error() > 7 | throw new Error()
| ^ | ^
8 | }, 10) 8 | }, 10)
9 | return { 9 | return {
10 | props: {}, 10 | props: {},
⨯ uncaughtException: Error: ⨯ uncaughtException: Error:
at Timeout._onTimeout (../../test/integration/server-side-dev-errors/pages/uncaught-empty-exception.js:7:10) at Timeout._onTimeout (../../test/integration/server-side-dev-errors/pages/uncaught-empty-exception.js:7:10)
5 | export async function getServerSideProps() { 5 | export async function getServerSideProps() {
6 | setTimeout(() => { 6 | setTimeout(() => {
> 7 | throw new Error() > 7 | throw new Error()
| ^ | ^
8 | }, 10) 8 | }, 10)
9 | return { 9 | return {
10 | props: {}," 10 | props: {},"
`) `)
} else { } else {
expect(stderrOutput).toMatchInlineSnapshot(` expect(stderrOutput).toMatchInlineSnapshot(`
"Error: "Error:
at Timeout.eval [as _onTimeout] (../../test/integration/server-side-dev-errors/pages/uncaught-empty-exception.js:7:10) at Timeout.eval [as _onTimeout] (../../test/integration/server-side-dev-errors/pages/uncaught-empty-exception.js:7:10)
5 | export async function getServerSideProps() { 5 | export async function getServerSideProps() {
6 | setTimeout(() => { 6 | setTimeout(() => {
> 7 | throw new Error() > 7 | throw new Error()
| ^ | ^
8 | }, 10) 8 | }, 10)
9 | return { 9 | return {
10 | props: {}, 10 | props: {},
⨯ uncaughtException: Error: ⨯ uncaughtException: Error:
at Timeout.eval [as _onTimeout] (../../test/integration/server-side-dev-errors/pages/uncaught-empty-exception.js:7:10) at Timeout.eval [as _onTimeout] (../../test/integration/server-side-dev-errors/pages/uncaught-empty-exception.js:7:10)
5 | export async function getServerSideProps() { 5 | export async function getServerSideProps() {
6 | setTimeout(() => { 6 | setTimeout(() => {
> 7 | throw new Error() > 7 | throw new Error()
| ^ | ^
8 | }, 10) 8 | }, 10)
9 | return { 9 | return {
10 | props: {}, 10 | props: {},
⨯ uncaughtException: Error: ⨯ uncaughtException: Error:
at Timeout.eval [as _onTimeout] (../../test/integration/server-side-dev-errors/pages/uncaught-empty-exception.js:7:10) at Timeout.eval [as _onTimeout] (../../test/integration/server-side-dev-errors/pages/uncaught-empty-exception.js:7:10)
5 | export async function getServerSideProps() { 5 | export async function getServerSideProps() {
6 | setTimeout(() => { 6 | setTimeout(() => {
> 7 | throw new Error() > 7 | throw new Error()
| ^ | ^
8 | }, 10) 8 | }, 10)
9 | return { 9 | return {
10 | props: {}," 10 | props: {},"
`) `)
} }
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment