Skip to content

Commit 00261e9

Browse files
authored
[test] Run all dev tests with sourcemaps enabled (#83173)
1 parent 186174a commit 00261e9

File tree

15 files changed

+8
-32
lines changed

15 files changed

+8
-32
lines changed

packages/next/src/build/webpack/config/blocks/base.ts

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,11 @@ export const base = curry(function base(
3535

3636
// https://webpack.js.org/configuration/devtool/#development
3737
if (ctx.isDevelopment) {
38-
if (process.env.__NEXT_TEST_MODE && !process.env.__NEXT_TEST_WITH_DEVTOOL) {
39-
config.devtool = false
40-
} else {
41-
// `eval-source-map` provides full-fidelity source maps for the
42-
// original source, including columns and original variable names.
43-
// This is desirable so the in-browser debugger can correctly pause
44-
// and show scoped variables with their original names.
45-
config.devtool = 'eval-source-map'
46-
}
38+
// `eval-source-map` provides full-fidelity source maps for the
39+
// original source, including columns and original variable names.
40+
// This is desirable so the in-browser debugger can correctly pause
41+
// and show scoped variables with their original names.
42+
config.devtool = 'eval-source-map'
4743
} else {
4844
if (
4945
ctx.isEdgeRuntime ||

test/development/middleware-errors/index.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { nextTestSetup } from 'e2e-utils'
55
describe('middleware - development errors', () => {
66
const { next, isTurbopack } = nextTestSetup({
77
files: __dirname,
8-
env: { __NEXT_TEST_WITH_DEVTOOL: '1' },
98
patchFileDelay: 500,
109
})
1110
beforeEach(async () => {

test/integration/client-navigation-a11y/test/index.test.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ const getMainHeadingTitle = async (browser) =>
2929
describe('Client Navigation accessibility', () => {
3030
beforeAll(async () => {
3131
context.appPort = await findPort()
32-
context.server = await launchApp(appDir, context.appPort, {
33-
env: { __NEXT_TEST_WITH_DEVTOOL: 1 },
34-
})
32+
context.server = await launchApp(appDir, context.appPort)
3533

3634
const prerender = [
3735
'/page-with-h1-and-title, /page-with-h1, /page-with-title, /page-without-h1-or-title',

test/integration/config-devtool-dev/test/index.test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ const appDir = join(__dirname, '../')
2222

2323
const appPort = await findPort()
2424
const app = await launchApp(appDir, appPort, {
25-
env: { __NEXT_TEST_WITH_DEVTOOL: true },
2625
onStderr(msg) {
2726
stderr += msg || ''
2827
},

test/integration/edge-runtime-configurable-guards/test/index.test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ const context = {
3030
),
3131
}
3232
const appOption = {
33-
env: { __NEXT_TEST_WITH_DEVTOOL: 1 },
3433
onStdout(msg) {
3534
context.logs.output += msg
3635
context.logs.stdout += msg

test/integration/edge-runtime-dynamic-code/test/index.test.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ describe('Page using eval in development mode', () => {
3030
beforeAll(async () => {
3131
context.appPort = await findPort()
3232
context.app = await launchApp(context.appDir, context.appPort, {
33-
env: { __NEXT_TEST_WITH_DEVTOOL: 1 },
3433
onStdout(msg) {
3534
output += msg
3635
},
@@ -84,7 +83,6 @@ describe.each([
8483
beforeAll(async () => {
8584
context.appPort = await findPort()
8685
context.app = await launchApp(context.appDir, context.appPort, {
87-
env: { __NEXT_TEST_WITH_DEVTOOL: 1 },
8886
onStdout(msg) {
8987
output += msg
9088
},

test/integration/edge-runtime-module-errors/test/utils.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ export const context = {
1111
page: new File(join(__dirname, '../pages/index.js')),
1212
}
1313
export const appOption = {
14-
env: { __NEXT_TEST_WITH_DEVTOOL: 1 },
1514
onStdout(msg) {
1615
context.logs.output += msg
1716
context.logs.stdout += msg

test/integration/edge-runtime-response-error/test/index.test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ const context = {
2424
page: new File(join(__dirname, '../pages/index.js')),
2525
}
2626
const appOption = {
27-
env: { __NEXT_TEST_WITH_DEVTOOL: 1 },
2827
onStdout(msg) {
2928
context.logs.output += msg
3029
context.logs.stdout += msg

test/integration/edge-runtime-streaming-error/test/index.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ describe('development mode', () => {
5757
context.appPort = await findPort()
5858
context.app = await launchApp(appDir, context.appPort, {
5959
...context.handler,
60-
env: { __NEXT_TEST_WITH_DEVTOOL: '1' },
6160
})
6261
})
6362

test/integration/edge-runtime-with-node.js-apis/test/index.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ describe.each([
7373
beforeAll(async () => {
7474
appPort = await findPort()
7575
app = await launchApp(appDir, appPort, {
76-
env: { __NEXT_TEST_WITH_DEVTOOL: '1' },
7776
onStdout(msg) {
7877
output += msg
7978
},

0 commit comments

Comments
 (0)