Skip to content

Commit ed01269

Browse files
authored
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
1 parent 539c644 commit ed01269

File tree

1 file changed

+114
-112
lines changed

1 file changed

+114
-112
lines changed

test/integration/server-side-dev-errors/test/index.test.js

Lines changed: 114 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ import {
1212
} from 'next-test-utils'
1313
import stripAnsi from 'strip-ansi'
1414

15+
const isRspack = process.env.NEXT_RSPACK !== undefined
16+
1517
const appDir = join(__dirname, '../')
1618
const gspPage = join(appDir, 'pages/gsp.js')
1719
const gsspPage = join(appDir, 'pages/gssp.js')
@@ -518,7 +520,7 @@ describe('server-side dev errors', () => {
518520
)
519521
.trim()
520522
// FIXME(veil): error repeated
521-
if (isTurbopack) {
523+
if (isTurbopack || isRspack) {
522524
expect(stderrOutput).toMatchInlineSnapshot(`
523525
"Error: catch this rejection
524526
at Timeout._onTimeout (../../test/integration/server-side-dev-errors/pages/uncaught-rejection.js:7:19)
@@ -597,65 +599,65 @@ describe('server-side dev errors', () => {
597599
)
598600
.trim()
599601
// FIXME(veil): error repeated
600-
if (isTurbopack) {
602+
if (isTurbopack || isRspack) {
601603
expect(stderrOutput).toMatchInlineSnapshot(`
602-
"Error:
603-
at Timeout._onTimeout (../../test/integration/server-side-dev-errors/pages/uncaught-empty-rejection.js:7:19)
604-
5 | export async function getServerSideProps() {
605-
6 | setTimeout(() => {
606-
> 7 | Promise.reject(new Error())
607-
| ^
608-
8 | }, 10)
609-
9 | return {
610-
10 | props: {},
611-
⨯ unhandledRejection: Error:
612-
at Timeout._onTimeout (../../test/integration/server-side-dev-errors/pages/uncaught-empty-rejection.js:7:19)
613-
5 | export async function getServerSideProps() {
614-
6 | setTimeout(() => {
615-
> 7 | Promise.reject(new Error())
616-
| ^
617-
8 | }, 10)
618-
9 | return {
619-
10 | props: {},
620-
⨯ unhandledRejection: Error:
621-
at Timeout._onTimeout (../../test/integration/server-side-dev-errors/pages/uncaught-empty-rejection.js:7:19)
622-
5 | export async function getServerSideProps() {
623-
6 | setTimeout(() => {
624-
> 7 | Promise.reject(new Error())
625-
| ^
626-
8 | }, 10)
627-
9 | return {
628-
10 | props: {},"
604+
"Error:
605+
at Timeout._onTimeout (../../test/integration/server-side-dev-errors/pages/uncaught-empty-rejection.js:7:19)
606+
5 | export async function getServerSideProps() {
607+
6 | setTimeout(() => {
608+
> 7 | Promise.reject(new Error())
609+
| ^
610+
8 | }, 10)
611+
9 | return {
612+
10 | props: {},
613+
⨯ unhandledRejection: Error:
614+
at Timeout._onTimeout (../../test/integration/server-side-dev-errors/pages/uncaught-empty-rejection.js:7:19)
615+
5 | export async function getServerSideProps() {
616+
6 | setTimeout(() => {
617+
> 7 | Promise.reject(new Error())
618+
| ^
619+
8 | }, 10)
620+
9 | return {
621+
10 | props: {},
622+
⨯ unhandledRejection: Error:
623+
at Timeout._onTimeout (../../test/integration/server-side-dev-errors/pages/uncaught-empty-rejection.js:7:19)
624+
5 | export async function getServerSideProps() {
625+
6 | setTimeout(() => {
626+
> 7 | Promise.reject(new Error())
627+
| ^
628+
8 | }, 10)
629+
9 | return {
630+
10 | props: {},"
629631
`)
630632
} else {
631633
expect(stderrOutput).toMatchInlineSnapshot(`
632-
"Error:
633-
at Timeout.eval [as _onTimeout] (../../test/integration/server-side-dev-errors/pages/uncaught-empty-rejection.js:7:19)
634-
5 | export async function getServerSideProps() {
635-
6 | setTimeout(() => {
636-
> 7 | Promise.reject(new Error())
637-
| ^
638-
8 | }, 10)
639-
9 | return {
640-
10 | props: {},
641-
⨯ unhandledRejection: Error:
642-
at Timeout.eval [as _onTimeout] (../../test/integration/server-side-dev-errors/pages/uncaught-empty-rejection.js:7:19)
643-
5 | export async function getServerSideProps() {
644-
6 | setTimeout(() => {
645-
> 7 | Promise.reject(new Error())
646-
| ^
647-
8 | }, 10)
648-
9 | return {
649-
10 | props: {},
650-
⨯ unhandledRejection: Error:
651-
at Timeout.eval [as _onTimeout] (../../test/integration/server-side-dev-errors/pages/uncaught-empty-rejection.js:7:19)
652-
5 | export async function getServerSideProps() {
653-
6 | setTimeout(() => {
654-
> 7 | Promise.reject(new Error())
655-
| ^
656-
8 | }, 10)
657-
9 | return {
658-
10 | props: {},"
634+
"Error:
635+
at Timeout.eval [as _onTimeout] (../../test/integration/server-side-dev-errors/pages/uncaught-empty-rejection.js:7:19)
636+
5 | export async function getServerSideProps() {
637+
6 | setTimeout(() => {
638+
> 7 | Promise.reject(new Error())
639+
| ^
640+
8 | }, 10)
641+
9 | return {
642+
10 | props: {},
643+
⨯ unhandledRejection: Error:
644+
at Timeout.eval [as _onTimeout] (../../test/integration/server-side-dev-errors/pages/uncaught-empty-rejection.js:7:19)
645+
5 | export async function getServerSideProps() {
646+
6 | setTimeout(() => {
647+
> 7 | Promise.reject(new Error())
648+
| ^
649+
8 | }, 10)
650+
9 | return {
651+
10 | props: {},
652+
⨯ unhandledRejection: Error:
653+
at Timeout.eval [as _onTimeout] (../../test/integration/server-side-dev-errors/pages/uncaught-empty-rejection.js:7:19)
654+
5 | export async function getServerSideProps() {
655+
6 | setTimeout(() => {
656+
> 7 | Promise.reject(new Error())
657+
| ^
658+
8 | }, 10)
659+
9 | return {
660+
10 | props: {},"
659661
`)
660662
}
661663
})
@@ -675,7 +677,7 @@ describe('server-side dev errors', () => {
675677
)
676678
.trim()
677679
// FIXME(veil): error repeated
678-
if (isTurbopack) {
680+
if (isTurbopack || isRspack) {
679681
expect(stderrOutput).toMatchInlineSnapshot(`
680682
"Error: catch this exception
681683
at Timeout._onTimeout (../../test/integration/server-side-dev-errors/pages/uncaught-exception.js:7:10)
@@ -753,65 +755,65 @@ describe('server-side dev errors', () => {
753755
)
754756
.trim()
755757
// FIXME(veil): error repeated
756-
if (isTurbopack) {
758+
if (isTurbopack || isRspack) {
757759
expect(stderrOutput).toMatchInlineSnapshot(`
758-
"Error:
759-
at Timeout._onTimeout (../../test/integration/server-side-dev-errors/pages/uncaught-empty-exception.js:7:10)
760-
5 | export async function getServerSideProps() {
761-
6 | setTimeout(() => {
762-
> 7 | throw new Error()
763-
| ^
764-
8 | }, 10)
765-
9 | return {
766-
10 | props: {},
767-
⨯ uncaughtException: Error:
768-
at Timeout._onTimeout (../../test/integration/server-side-dev-errors/pages/uncaught-empty-exception.js:7:10)
769-
5 | export async function getServerSideProps() {
770-
6 | setTimeout(() => {
771-
> 7 | throw new Error()
772-
| ^
773-
8 | }, 10)
774-
9 | return {
775-
10 | props: {},
776-
⨯ uncaughtException: Error:
777-
at Timeout._onTimeout (../../test/integration/server-side-dev-errors/pages/uncaught-empty-exception.js:7:10)
778-
5 | export async function getServerSideProps() {
779-
6 | setTimeout(() => {
780-
> 7 | throw new Error()
781-
| ^
782-
8 | }, 10)
783-
9 | return {
784-
10 | props: {},"
760+
"Error:
761+
at Timeout._onTimeout (../../test/integration/server-side-dev-errors/pages/uncaught-empty-exception.js:7:10)
762+
5 | export async function getServerSideProps() {
763+
6 | setTimeout(() => {
764+
> 7 | throw new Error()
765+
| ^
766+
8 | }, 10)
767+
9 | return {
768+
10 | props: {},
769+
⨯ uncaughtException: Error:
770+
at Timeout._onTimeout (../../test/integration/server-side-dev-errors/pages/uncaught-empty-exception.js:7:10)
771+
5 | export async function getServerSideProps() {
772+
6 | setTimeout(() => {
773+
> 7 | throw new Error()
774+
| ^
775+
8 | }, 10)
776+
9 | return {
777+
10 | props: {},
778+
⨯ uncaughtException: Error:
779+
at Timeout._onTimeout (../../test/integration/server-side-dev-errors/pages/uncaught-empty-exception.js:7:10)
780+
5 | export async function getServerSideProps() {
781+
6 | setTimeout(() => {
782+
> 7 | throw new Error()
783+
| ^
784+
8 | }, 10)
785+
9 | return {
786+
10 | props: {},"
785787
`)
786788
} else {
787789
expect(stderrOutput).toMatchInlineSnapshot(`
788-
"Error:
789-
at Timeout.eval [as _onTimeout] (../../test/integration/server-side-dev-errors/pages/uncaught-empty-exception.js:7:10)
790-
5 | export async function getServerSideProps() {
791-
6 | setTimeout(() => {
792-
> 7 | throw new Error()
793-
| ^
794-
8 | }, 10)
795-
9 | return {
796-
10 | props: {},
797-
⨯ uncaughtException: Error:
798-
at Timeout.eval [as _onTimeout] (../../test/integration/server-side-dev-errors/pages/uncaught-empty-exception.js:7:10)
799-
5 | export async function getServerSideProps() {
800-
6 | setTimeout(() => {
801-
> 7 | throw new Error()
802-
| ^
803-
8 | }, 10)
804-
9 | return {
805-
10 | props: {},
806-
⨯ uncaughtException: Error:
807-
at Timeout.eval [as _onTimeout] (../../test/integration/server-side-dev-errors/pages/uncaught-empty-exception.js:7:10)
808-
5 | export async function getServerSideProps() {
809-
6 | setTimeout(() => {
810-
> 7 | throw new Error()
811-
| ^
812-
8 | }, 10)
813-
9 | return {
814-
10 | props: {},"
790+
"Error:
791+
at Timeout.eval [as _onTimeout] (../../test/integration/server-side-dev-errors/pages/uncaught-empty-exception.js:7:10)
792+
5 | export async function getServerSideProps() {
793+
6 | setTimeout(() => {
794+
> 7 | throw new Error()
795+
| ^
796+
8 | }, 10)
797+
9 | return {
798+
10 | props: {},
799+
⨯ uncaughtException: Error:
800+
at Timeout.eval [as _onTimeout] (../../test/integration/server-side-dev-errors/pages/uncaught-empty-exception.js:7:10)
801+
5 | export async function getServerSideProps() {
802+
6 | setTimeout(() => {
803+
> 7 | throw new Error()
804+
| ^
805+
8 | }, 10)
806+
9 | return {
807+
10 | props: {},
808+
⨯ uncaughtException: Error:
809+
at Timeout.eval [as _onTimeout] (../../test/integration/server-side-dev-errors/pages/uncaught-empty-exception.js:7:10)
810+
5 | export async function getServerSideProps() {
811+
6 | setTimeout(() => {
812+
> 7 | throw new Error()
813+
| ^
814+
8 | }, 10)
815+
9 | return {
816+
10 | props: {},"
815817
`)
816818
}
817819
})

0 commit comments

Comments
 (0)